-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathheader.php
175 lines (130 loc) · 5.46 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?php
/**
* The template for displaying the Header.
*
* @package StormBringer
* @since StormBringer 0.0.1
*/
?>
<!doctype html>
<!--[if IEMobile 7 ]>
<html <?php language_attributes(); ?> class="no-js iem7"> <![endif]-->
<!--[if lt IE 7 ]>
<html <?php language_attributes(); ?> class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>
<html <?php language_attributes(); ?> class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>
<html <?php language_attributes(); ?> class="no-js ie8"> <![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html <?php language_attributes(); ?> class="no-js wf-loading" itemtype="http://schema.org/WebPage">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<?php wp_head(); ?>
<?php
// Check current user
global $current_user;
global $user_level;
wp_get_current_user();
?>
</head>
<body <?php body_class(''); ?>>
<?php
// Google Tag Manager for WordPress
if ( function_exists( 'gtm4wp_the_gtm_tag' ) ) { gtm4wp_the_gtm_tag(); }
?>
<!--[if lt IE 7]>
<p id="browsernotsupported" class="alert"><?php _e('You are using an outdated browser. Please <a class="alert-link" href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.', 'stormbringer');?></p>
<![endif]-->
<div id="wrapper">
<?php do_action( 'stormbringer_header_before' ); ?>
<div class="header-above-wrapper">
<header id="header-above">
<div class="header-above-inner">
<?php
if (is_active_sidebar('header-above-4')) {
$widget_columns = apply_filters('stormbringer_header_above_widget_regions', 4);
} elseif (is_active_sidebar('header-above-3')) {
$widget_columns = apply_filters('stormbringer_header_above_widget_regions', 3);
} elseif (is_active_sidebar('header-above-2')) {
$widget_columns = apply_filters('stormbringer_header_above_widget_regions', 2);
} elseif (is_active_sidebar('header-above-1')) {
$widget_columns = apply_filters('stormbringer_header_above_widget_regions', 1);
} else {
$widget_columns = apply_filters('stormbringer_header_above_widget_regions', 0);
}
if ($widget_columns > 0) : ?>
<?php
$i = 0;
while ($i < $widget_columns) : $i++;
if (is_active_sidebar('header-above-'.$i)) : ?>
<?php dynamic_sidebar('header-above-'.intval($i)); ?>
<?php endif;
endwhile; ?>
<?php endif;
?>
</div>
</header>
</div>
<!-- /.header-above-wrapper -->
<div class="header-wrapper">
<header id="header">
<div class="header-inner">
<?php
if (is_active_sidebar('header-4')) {
$widget_columns = apply_filters('stormbringer_header_widget_regions', 4);
} elseif (is_active_sidebar('header-3')) {
$widget_columns = apply_filters('stormbringer_header_widget_regions', 3);
} elseif (is_active_sidebar('header-2')) {
$widget_columns = apply_filters('stormbringer_header_widget_regions', 2);
} elseif (is_active_sidebar('header-1')) {
$widget_columns = apply_filters('stormbringer_header_widget_regions', 1);
} else {
$widget_columns = apply_filters('stormbringer_header_widget_regions', 0);
}
if ($widget_columns > 0) : ?>
<?php
$i = 0;
while ($i < $widget_columns) : $i++;
if (is_active_sidebar('header-'.$i)) : ?>
<?php dynamic_sidebar('header-'.intval($i)); ?>
<?php endif;
endwhile; ?>
<?php endif;
?>
</div>
</header>
</div>
<!-- /.header-wrapper -->
<div class="header-below-wrapper">
<header id="header-below">
<div class="header-below-inner">
<?php
if (is_active_sidebar('header-below-4')) {
$widget_columns = apply_filters('stormbringer_header_below_widget_regions', 4);
} elseif (is_active_sidebar('header-below-3')) {
$widget_columns = apply_filters('stormbringer_header_below_widget_regions', 3);
} elseif (is_active_sidebar('header-below-2')) {
$widget_columns = apply_filters('stormbringer_header_below_widget_regions', 2);
} elseif (is_active_sidebar('header-below-1')) {
$widget_columns = apply_filters('stormbringer_header_below_widget_regions', 1);
} else {
$widget_columns = apply_filters('stormbringer_header_below_widget_regions', 0);
}
if ($widget_columns > 0) : ?>
<?php
$i = 0;
while ($i < $widget_columns) : $i++;
if (is_active_sidebar('header-below-'.$i)) : ?>
<?php dynamic_sidebar('header-below-'.intval($i)); ?>
<?php endif;
endwhile; ?>
<?php endif;
?>
</div>
</header>
</div>
<!-- /.header-below-wrapper -->
<?php do_action( 'stormbringer_header_after' ); ?>
<div class="main-wrapper">
<div id="main">
<div class="main-inner">