-
Notifications
You must be signed in to change notification settings - Fork 64
/
header.php
executable file
·86 lines (64 loc) · 2.6 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="site-content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Go
*/
$header_flex_class = in_array( get_theme_mod( 'header_variation', \Go\Core\get_default_header_variation() ), array( 'header-6' ), true ) ? '' : ' flex';
?><!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="profile" href="https://gmpg.org/xfn/11" />
<?php wp_head(); ?>
</head>
<body
<?php
$body_class = get_body_class();
if ( Go\AMP\is_amp() ) {
?>
aria-expanded="false"
[aria-expanded]="mainNavMenuExpanded ? 'true' : 'false'"
[class]="'<?php echo esc_attr( implode( ' ', $body_class ) ); ?>' + ( mainNavMenuExpanded ? ' menu-is-open' : '' )"
<?php
}
?>
class="<?php echo esc_attr( implode( ' ', $body_class ) ); ?>"
>
<?php wp_body_open(); ?>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#site-content"><?php esc_html_e( 'Skip to content', 'go' ); ?></a>
<header id="site-header" class="site-header header relative <?php echo esc_attr( Go\has_header_background() ); ?> <?php echo esc_attr( get_theme_mod( 'header_variation' ) ); ?>" role="banner" itemscope itemtype="http://schema.org/WPHeader">
<div class="header__inner<?php echo esc_attr( $header_flex_class ); ?> items-center justify-between h-inherit w-full relative">
<div class="header__extras">
<?php do_action( 'go_header_social_icons' ); ?>
<?php Go\search_toggle(); ?>
<?php Go\WooCommerce\woocommerce_cart_link(); ?>
</div>
<div class="header__title-nav<?php echo esc_attr( $header_flex_class ); ?> items-center flex-nowrap">
<?php Go\display_site_branding(); ?>
<?php if ( has_nav_menu( 'primary' ) ) : ?>
<nav id="header__navigation" class="header__navigation" aria-label="<?php esc_attr_e( 'Horizontal', 'go' ); ?>" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
<div class="header__navigation-inner">
<?php
wp_nav_menu(
array(
'menu_class' => 'primary-menu list-reset',
'theme_location' => 'primary',
)
);
?>
</div>
</nav>
<?php endif; ?>
</div>
<?php Go\navigation_toggle(); ?>
</div>
<?php get_template_part( 'partials/modal-search' ); ?>
</header>
<main id="site-content" class="site-content" role="main">