-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathheader.php
122 lines (116 loc) · 4.23 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?php
/**
* The header for our theme.
*
* This is the template that displays all of the <head> section and top navigation menus
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package WordPress
* @subpackage Cornerstone
* @since 1.0
*/
?>
<!DOCTYPE html>
<!--[if IE 9]><html class="lt-ie10" <?php language_attributes(); ?> > <![endif]-->
<html class="no-js" <?php language_attributes(); ?> >
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php // off-canvas title bar for 'small' and 'medium' screen ?>
<div class="title-bar" data-responsive-toggle="widemenu" data-hide-for="large">
<div class="title-bar-left">
<?php if ( has_nav_menu( 'offCanvasLeft' ) ) { ?>
<button class="menu-icon" type="button" data-open="offCanvasLeft"></button>
<?php } ?>
<span class="title-bar-title" itemscope itemtype="http://schema.org/Organization">
<?php if ( function_exists( 'the_custom_logo' ) ) {
// Display Custom Logo if set in Customizer. If no logo is set then display Site Title.
$logo = get_custom_logo();
if(!empty($logo)) {
echo $logo;
} else { ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home" itemprop="url" tabindex="0"><?php bloginfo( 'name' ); ?></a>
<?php }
} ?>
</span>
</div>
<?php if ( has_nav_menu( 'offCanvasRight' ) ) { ?>
<div class="title-bar-right">
<div class="title-bar-title" data-open="offCanvasRight"><?php _e( 'Menu', 'cornerstone' ); ?></div>
<button class="menu-icon" type="button" data-open="offCanvasRight"></button>
</div>
<?php } ?>
</div>
<?php // off-canvas left menu
if ( has_nav_menu( 'offCanvasLeft' ) ) { ?>
<div class="off-canvas position-left" id="offCanvasLeft" data-off-canvas>
<?php wp_nav_menu( array(
'theme_location' => 'offCanvasLeft',
'container' => false,
'depth' => 0,
'items_wrap' => '<ul class="vertical menu accordion-menu" data-accordion-menu>%3$s</ul>',
'fallback_cb' => false,
'walker' => new Foundation_Accordion_Menu_Walker(),
)); ?>
</div>
<?php } ?>
<?php // off-canvas right menu
if ( has_nav_menu( 'offCanvasRight' ) ) { ?>
<div class="off-canvas position-right" id="offCanvasRight" data-off-canvas data-position="right">
<?php wp_nav_menu( array(
'theme_location' => 'offCanvasRight',
'container' => false,
'depth' => 0,
'items_wrap' => '<ul class="vertical menu accordion-menu" data-accordion-menu>%3$s</ul>',
'fallback_cb' => false,
'walker' => new Foundation_Accordion_Menu_Walker(),
)); ?>
</div>
<?php } ?>
<?php // "wider" top-bar menu for 'large' and up ?>
<div id="widemenu" class="top-bar">
<div class="top-bar-left">
<ul class="dropdown menu" data-dropdown-menu>
<li class="menu-text" itemscope itemtype="http://schema.org/Organization">
<?php if ( function_exists( 'the_custom_logo' ) ) {
$logo = get_custom_logo();
if(!empty($logo)) {
echo $logo;
} else { ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home" itemprop="url" tabindex="0"><?php bloginfo( 'name' ); ?></a>
<?php }
} ?>
</li>
<?php if ( has_nav_menu( 'header-menu-left' ) ) {
wp_nav_menu( array(
'theme_location' => 'header-menu-left',
'container' => false,
'depth' => 0,
'items_wrap' => '%3$s',
'fallback_cb' => false,
'walker' => new Foundation_Dropdown_Menu_Walker(),
));
} ?>
</ul>
</div>
<div class="top-bar-right">
<?php if ( has_nav_menu( 'header-menu-right' ) ) {
wp_nav_menu( array(
'theme_location' => 'header-menu-right',
'container' => false,
'depth' => 0,
'items_wrap' => '<ul class="dropdown menu" data-dropdown-menu>%3$s</ul>',
'fallback_cb' => false,
'walker' => new Foundation_Dropdown_Menu_Walker(),
));
} ?>
</div>
</div>
<?php do_action( 'cornerstone_after_header' ); ?>
<div class="off-canvas-content" data-off-canvas-content>