forked from xwolfde/Piratenkleider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
231 lines (201 loc) · 12.8 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html <?php language_attributes(); ?> class="ie6"> <![endif]-->
<!--[if IE 7 ]> <html <?php language_attributes(); ?> class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html <?php language_attributes(); ?> class="ie8"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html <?php language_attributes(); ?>> <!--<![endif]-->
<head>
<?php
global $defaultoptions;
$options = get_option( 'piratenkleider_theme_options' );
if (!isset($options['defaultwerbesticker']))
$options['defaultwerbesticker'] = $defaultoptions['defaultwerbesticker'];
if (!isset($options['alle-socialmediabuttons']))
$options['alle-socialmediabuttons'] = $defaultoptions['alle-socialmediabuttons'];
if (!isset($options['newsletter']))
$options['newsletter'] = $defaultoptions['newsletter'];
if (!isset($options['url-newsletteranmeldung']))
$options['url-newsletteranmeldung'] = $defaultoptions['url-newsletteranmeldung'];
if (!isset($options['stickerlink1-content']))
$options['stickerlink1-content'] = $defaultoptions['stickerlink1-content'];
if (!isset($options['stickerlink1-url']))
$options['stickerlink1-url'] = $defaultoptions['stickerlink1-url'];
if (!isset($options['stickerlink2-content']))
$options['stickerlink2-content'] = $defaultoptions['stickerlink2-content'];
if (!isset($options['stickerlink2-url']))
$options['stickerlink2-url'] = $defaultoptions['stickerlink2-url'];
if (!isset($options['stickerlink2-content']))
$options['stickerlink3-content'] = $defaultoptions['stickerlink3-content'];
if (!isset($options['stickerlink3-url']))
$options['stickerlink3-url'] = $defaultoptions['stickerlink3-url'];
if (!isset($options['aktiv-suche']))
$options['aktiv-suche'] = $defaultoptions['aktiv-suche'];
if (!isset($options['aktiv-linkmenu']))
$options['aktiv-linkmenu'] = $defaultoptions['aktiv-linkmenu'];
$designspecials = get_option( 'piratenkleider_theme_designspecials' );
if (isset($designspecials['css-default-header-height'])
&& ($designspecials['css-default-header-height'] > 0)
&& ($designspecials['css-default-header-height'] != $defaultoptions['css-default-header-height'])) {
$cssadd .= '.header { height: '.$designspecials['css-default-header-height'].'px; }';
$cssadd .= "\n";
}
if (isset($designspecials['css-default-header-background-color'])
&& (strlen($designspecials['css-default-header-background-color'])>3)) {
$cssadd .= '.header { background-color: '.$designspecials['css-default-header-background-color'].'; }';
$cssadd .= "\n";
}
if (isset($designspecials['css-default-header-background-image'])
&& (strlen($designspecials['css-default-header-background-image'])>2)) {
$cssadd .= '.header { background-image: '.$designspecials['css-default-header-background-image'].'; }';
$cssadd .= "\n";
}
if (isset($designspecials['css-default-header-background-position'])
&& (strlen($designspecials['css-default-header-background-position'])>2)) {
$cssadd .= '.header { background-position: '.$designspecials['css-default-header-background-position'].'; }';
$cssadd .= "\n";
}
if (isset($designspecials['css-default-header-background-repeat'])
&& (strlen($designspecials['css-default-header-background-repeat'])>2)) {
$cssadd .= '.header { background-repeat: '.$designspecials['css-default-header-background-repeat'].'; }';
$cssadd .= "\n";
}
if (isset($designspecials['css-default-branding-padding-top'])
&& ($designspecials['css-default-branding-padding-top'] > 0)
&& ($designspecials['css-default-branding-padding-top'] != $defaultoptions['css-default-branding-padding-top'])) {
$cssadd .= '.header .branding { padding-top: '.$designspecials['css-default-branding-padding-top'].'px; }';
$cssadd .= "\n";
}
if (isset($designspecials['css-eigene-anweisungen'])) {
$cssadd .= $designspecials['css-eigene-anweisungen'];
$cssadd .= "\n";
}
?>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<!--[if IE]> <meta http-equiv="X-UA-Compatible" content="IE=9"> <![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php wp_title( '|', true, 'right' ); ?></title>
<?php
if ((isset( $options['meta-description'] )) && ( strlen(trim($options['meta-description']))>1 )) { ?>
<meta name="description" content="<?php echo $options['meta-description'] ?>">
<?php }
if ((isset( $options['meta-author'] )) && ( strlen(trim($options['meta-author']))>1 )) { ?>
<meta name="author" content="<?php echo $options['meta-author'] ?>">
<?php }
if ((isset( $options['meta-keywords'] )) && ( strlen(trim($options['meta-keywords']))>1 )) { ?>
<meta name="keywords" content="<?php echo $options['meta-keywords'] ?>">
<?php } ?>
<link rel="apple-touch-icon" href="<?php echo get_template_directory_uri(); ?>/apple-touch-icon.png">
<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/favicon.ico">
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>">
<?php if ((isset($designspecials['css-colorfile'])) && (strlen(trim($designspecials['css-colorfile']))>1)) {
echo '<link rel="stylesheet" type="text/css" media="all" href="'.get_template_directory_uri().'/css/'.$designspecials['css-colorfile'].'">';
} ?>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
wp_head();
if (isset($designspecials['aktiv-mediaqueries-allparts']) && ($designspecials['aktiv-mediaqueries-allparts']==1)) {
echo '<link rel="stylesheet" type="text/css" media="screen" href="'.get_template_directory_uri().'/css/basemod_mediaqueries_allparts.css">';
}
?>
<!--[if lte IE 7]>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/yaml/core/iehacks.min.css" type="text/css"/>
<![endif]-->
<?php if ((isset($cssadd)) && (strlen(trim($cssadd))>1)) {
echo "<style type=\"text/css\">\n";
echo $cssadd;
echo "</style>\n";
} ?>
</head>
<body <?php body_class(); ?>>
<ul role="navigation" class="nav skiplinks">
<li><a class="ym-skip" href="#nav"><?php _e( 'Zur Navigation springen.', 'piratenkleider' ); ?></a></li>
<li><a class="ym-skip" href="#main-content"><?php _e( 'Zum Inhalt springen.', 'piratenkleider' ); ?></a></li>
<li><a class="ym-skip" href="#searchform"><?php _e( 'Zur Suche springen.', 'piratenkleider' ); ?></a></li>
</ul>
<div class="section header">
<div class="row">
<div class="branding">
<?php if ( ! is_home() ) { ?>
<a href="<?php echo home_url( '/' ); ?>" title="<?php echo $defaultoptions['default_text_title_home_backlink']; ?>" rel="home" class="logo">
<?php }
function piratenkleider_header_style() {}
?>
<h1><img src="<?php header_image(); ?>" alt="<?php bloginfo( 'name' ); ?>"></h1>
<?php if ( ! is_home() ) { ?> </a> <?php } ?>
</div>
<div class="nav-top" role="navigation">
<h2 class="skip"><?php _e( 'Service-Navigation', 'piratenkleider' ); ?></h2>
<?php
get_piratenkleider_socialmediaicons($options['alle-socialmediabuttons']);
if ( $options['aktiv-linkmenu'] == "1" ){
if ( has_nav_menu( 'top' ) ) {
wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'top' ) );
} else {
global $default_toplink_liste;
if (is_array($default_toplink_liste)) { ?>
<div class="menu-header">
<ul id="menu-topmenu" class="menu">
<?php
foreach($default_toplink_liste as $i => $value) {
echo '<li><a href="'.$value.'">';
echo $i.'</a></li>';
}
?>
</ul>
</div>
<?php
}
}
}
if ( $options['aktiv-suche'] == "1" ){
get_search_form();
}
?>
</div>
<div class="nav-main" role="navigation" id="nav">
<h2 class="skip"><?php _e( 'Navigation', 'piratenkleider' ); ?></h2>
<?php
if ( has_nav_menu( 'primary' ) ) {
wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary', 'walker' => new My_Walker_Nav_Menu()) );
} else { ?>
<div class="menu-header">
<ul id="menu-mainmenu" class="menu">
<?php wp_page_menu( array(
'sort_column' => 'menu_order, post_title',
'echo' => 1,
'show_home' => 1 ) ); ?>
</ul>
</div>
<?php } ?>
</div>
<?php if ( $options['defaultwerbesticker'] == "1" ){ ?>
<div class="sticker">
<div class="skin">
<h2 class="skip"><?php _e( 'Sticker', 'piratenkleider' ); ?></h2>
<ul>
<?php if (isset($options['stickerlink1-content']) && (strlen($options['stickerlink1-content']) > 1)
&& isset($options['stickerlink1-url']) && (strlen($options['stickerlink1-url']) > 5) ) {
echo '<li><a href="'.$options['stickerlink1-url'].'">'.$options['stickerlink1-content'].'</a></li>';
} ?>
<?php if (isset($options['stickerlink2-content']) && (strlen($options['stickerlink2-content']) > 1)
&& isset($options['stickerlink2-url']) && (strlen($options['stickerlink2-url']) > 5) ) {
echo '<li><a href="'.$options['stickerlink2-url'].'">'.$options['stickerlink2-content'].'</a></li>';
} ?>
<?php if (isset($options['stickerlink3-content']) && (strlen($options['stickerlink3-content']) > 1)
&& isset($options['stickerlink3-url']) && (strlen($options['stickerlink3-url']) > 5) ) {
echo '<li><a href="'.$options['stickerlink3-url'].'">'.$options['stickerlink3-content'].'</a></li>';
} ?>
</ul>
</div>
</div>
<?php } ?>
</div>
</div>
<div class="section breadcrumbs">
<div class="row">
<div class="skin">
<?php if (function_exists('dimox_breadcrumbs')) dimox_breadcrumbs(); ?>
</div>
</div>
</div>