-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathheader.php
57 lines (47 loc) · 1.22 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* The header template. Included by get_header().
*/
namespace k1;
use \k1\Media;
use \k1\Templates as T;
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta name="viewport" content="initial-scale=1">
<?php wp_head(); ?>
</head>
<?php
global $is_anon_user;
$is_anon_user = !is_user_logged_in();
?>
<body <?php body_class([
!$is_anon_user ? 'user-logged-in' : 'user-not-logged-in',
]);?>>
<!-- Prevent FOUC in firefox, see https://bugzilla.mozilla.org/show_bug.cgi?id=1404468#c68 -->
<script>0</script>
<a class="skip-link sr-text" href="#content">
Skip to content
</a>
<header class="k1-header k1-header--site">
<div class="k1-header__beforeMenu k1-container">
<?php
if (\has_custom_logo()) {
\the_custom_logo();
} ?>
<?=T\Search()?>
</div>
<nav class="k1-navigation k1-navigation--main k1-scheme--base-invert">
<div class="k1-container">
<?php if (\has_nav_menu('header-menu')) {
\wp_nav_menu([
"theme_location" => "header-menu",
]);
} else {
echo "<p>Header menu is empty.</p>";
}?>
</div>
</nav>
</header>
<main id="content">