This repository has been archived by the owner on Nov 19, 2023. It is now read-only.
forked from korbinian/Piratenkleider
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathheader.php
155 lines (144 loc) · 9.28 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
<!DOCTYPE html>
<!--[if IE 8 ]> <html <?php language_attributes(); ?> class="ie8"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html <?php echo piratenkleider_html_tag_schema(); ?> <?php language_attributes(); ?>> <!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<?php wp_head();
global $defaultoptions;
global $options;
$cssadd = '';
if (isset($options['css-eigene-anweisungen'])) {
$cssadd .= $options['css-eigene-anweisungen'];
$cssadd .= "\n";
}
if ((isset($cssadd)) && (strlen(trim($cssadd))>1)) {
echo "<style type=\"text/css\">\n";
echo $cssadd;
echo "</style>\n";
} ?>
</head>
<body <?php body_class(); ?>>
<nav aria-label="Skiplinks">
<ul id="top" class="nav skiplinks">
<li><a id="skiplink-nav" href="#nav"><?php _e( 'Jump to navigation.', 'piratenkleider' ); ?></a></li>
<li><a id="skiplink-content" href="#main-content"><?php _e( 'Jump to content.', 'piratenkleider' ); ?></a></li>
<?php if ( $options['aktiv-suche'] == "1" ){ ?><li><a id="skiplink-search" href="#searchform"><?php _e( 'Jump to search form.', 'piratenkleider' ); ?></a></li><?php } ?>
</ul>
</nav>
<header class="section header">
<div class="row">
<div class="nav-top" role="navigation">
<h2 class="skip"><?php _e( 'Service-Navigation', 'piratenkleider' ); ?></h2>
<?php
get_piratenkleider_socialmediaicons(1);
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
echo "\n";
foreach ( $default_toplink_liste as $entry => $listdata ) {
$value = '';
$active = 0;
if ((isset($options['toplinkliste'])) &&
(isset($options['toplinkliste'][$entry]['content']))) {
$value = $options['toplinkliste'][$entry]['content'];
if (isset($options['toplinkliste'][$entry]['active'])) {
$active = $options['toplinkliste'][$entry]['active'];
}
} else {
$value = $default_toplink_liste[$entry]['content'];
$active = $default_toplink_liste[$entry]['active'];
}
if (($active ==1) && ($value)) {
echo "\t\t\t\t\t\t";
echo '<li><a class="icon_'.$entry.'" href="'.$value.'">';
echo $listdata['name'].'</a></li>';
echo "\n";
}
}
?>
</ul>
</div>
<?php
}
}
}
if ( $options['aktiv-suche'] == "1" ){ ?>
<div class="search-top">
<h2 class="skip"><?php _e("Search", 'piratenkleider'); ?></h2>
<form method="get" class="searchform" action="<?php echo home_url('','relative'); ?>/" role="search">
<label class="skip" for="s"><?php _e("Searching for", 'piratenkleider'); ?>:</label>
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" placeholder="<?php _e("Enter search term", 'piratenkleider'); ?>"
onfocus="if(this.value=='<?php _e("Enter search term", 'piratenkleider'); ?>')this.value='';" onblur="if(this.value=='')this.value='<?php _e("Enter search term", 'piratenkleider'); ?>';" />
<input type="submit" class="searchsubmit" value="<?php _e("Search", 'piratenkleider'); ?>" />
</form>
</div>
<?php } ?>
</div>
<div class="branding" role="banner" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<?php if ( ! is_home() ) { ?>
<a itemprop="url" href="<?php echo home_url( '/' ); ?>" title="<?php echo $defaultoptions['default_text_title_home_backlink']; ?>" rel="home" class="logo">
<?php } ?>
<h1><img itemprop="logo" src="<?php echo wp_make_link_relative(get_header_image()); ?>" alt="<?php bloginfo( 'name' ); ?>"></h1>
<meta itemprop="name" content="<?php echo esc_attr(piratenkleider_tag_schema_org_name()); ?>" />
<?php if ( ! is_home() ) { ?>
</a>
<?php } if (strlen(trim(get_bloginfo( 'description' )))>1) { ?>
<p class="description slogan" itemprop="description"><?php echo esc_attr(piratenkleider_tag_schema_org_desc()); ?></p>
<?php } ?>
</div>
<div class="sticker" aria-hidden="true">
<?php if ( $options['defaultwerbesticker'] == "1" ){ ?>
<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>
<?php } ?>
</div>
<nav aria-label="<?php _e( 'Navigation', 'piratenkleider' ); ?>" class="nav-main" id="nav" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
<h2 class="skip"><?php _e( 'Navigation', 'piratenkleider' ); ?></h2>
<?php
if ( has_nav_menu( 'primary' ) ) {
wp_nav_menu( array( 'theme_location' => 'primary', 'walker' => new Piratenkleider_Menu_Walker()) );
} else { ?>
<div class="menu-hauptmenu-container">
<ul id="menu-mainmenu" class="menu">
<?php wp_page_menu( array(
'menu_class' => '',
'sort_column' => 'menu_order, post_title',
'echo' => 1,
'show_home' => 1 ) ); ?>
</ul>
</div>
<?php } ?>
</nav>
</div>
</header>
<?php if ($options['zeige_breadcrump']==1) { ?>
<div id="content-body" class="with-breadcrumb">
<div class="section breadcrumbs">
<div class="row"><div class="skin">
<?php if (function_exists('piratenkleider_breadcrumb')) piratenkleider_breadcrumb();
?>
</div></div>
</div>
<?php } else { ?>
<div id="content-body">
<?php }