-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
132 lines (120 loc) · 3.92 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
123
124
125
126
127
128
129
130
131
132
<?php global $theme; ?>
<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html id="ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<meta name="viewport" content="initial-scale=1.0,width=device-width" />
<?php echo $theme->render('meta'); ?>
<title><?php
wp_title('|', true, 'right');
// Add the blog name.
bloginfo('name');
// Add the blog description for the home/front page.
$site_description = get_bloginfo('description', 'display');
if ($site_description && is_front_page()) {
echo " | $site_description";
}
?></title>
<link rel="icon" href="<?php echo $theme->info('url'); ?>/img/favicon.ico" type="image/x-icon" />
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<!--[if lte IE 8]>
<link rel="stylesheet" media="all" href="<?php echo $theme->info('base_url'); ?>/css/ie8.css" />
<![endif]-->
<!--[if lte IE 7]>
<link rel="stylesheet" media="all" href="<?php echo $theme->info('base_url'); ?>/css/ie7.css" />
<![endif]-->
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<script>var RH = RH || {}; RH.base_url = "<?php echo $theme->info('base_url'); ?>";</script>
<?php wp_head(); ?>
<!--[if lte IE 8]>
<script src="<?php echo $theme->info('base_url'); ?>/js/iefixes.js"></script>
<![endif]-->
<?php echo $theme->render('analytics'); ?>
<body <?php body_class(); ?>>
<div id="page" class="hfeed clearfix">
<section class="main-navigation clearfix">
<div class="branding">
<h1 class="clearfix">
<a href="/">
<?php
echo '<div class="logo">';
echo $theme->Html->image('logo.png', array(
'alt' => 'RH',
'parent' => false
));
echo $theme->Html->tag('span', $theme->info('short_name'), array(
'class' => 'title desktop-hide tablet-hide'
));
echo $theme->Html->image('textlogo-white.png', array(
'alt' => 'ROCKHARBOR',
'class' => 'mobile-hide',
'parent' => true
));
echo '</div>';
echo '<div class="title mobile-hide">';
if (!$theme->info('hide_name_in_global_nav')) {
echo $theme->Html->tag('span', $theme->info('name'));
}
echo '</div>';
?>
</a>
</h1>
</div>
<div class="desktop-hide tablet-hide mobile-menu">
<ul class="clearfix">
<li class="menu"></li>
</ul>
</div>
<nav class="access clearfix" role="navigation">
<?php
$locations = get_nav_menu_locations();
$menu_items = wp_get_nav_menu_items($locations['main'], array('auto_show_children' => false));
_wp_menu_item_classes_by_context($menu_items);
$menu = array();
foreach ($menu_items as $key => $menu_item) {
$a = $theme->Html->tag('a', $menu_item->title, array('href' => $menu_item->url));
$opts = array(
'class' => implode(' ', $menu_item->classes)
);
$menu[] = array(
'a' => $a,
'opts' => $opts
);
}
$output = '';
foreach ($menu as $menuItem) {
$output .= $theme->Html->tag('li', $menuItem['a'], $menuItem['opts']);
}
$title = $theme->Html->tag('span', 'Pages');
$dropdown = $theme->Html->tag('div', $title.$theme->Html->tag('ul', $output, array('class' => 'submenu clearfix')), array('class' => 'dropdown'));
if (!empty($menu)) {
echo $dropdown;
}
?>
</nav>
</section>
<?php
get_sidebar();
?>
<?php
if (isset($_SESSION['message'])) {
echo $theme->Html->tag('div', $_SESSION['message'], array('class' => 'flash-message'));
unset($_SESSION['message']);
}
?>
<div id="main" class="clearfix">