-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
executable file
·86 lines (74 loc) · 2.93 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
<?php
/**
* The template for displaying the header
*
* Displays all of the <head> section and everything up until the "site-content" div.
*
* @package WordPress
* @subpackage Twenty_Fifteen
* @since Twenty Fifteen 1.0
*/
$displayheader = get_theme_mod('tagline_options');
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<!-- On the "E" -->
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<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 esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script>
<![endif]-->
<script>(function(){document.documentElement.className='js'})();</script>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'twentyfifteen' ); ?></a>
<div id="sidebar" class="sidebar <?php echo $displayheader; ?>">
<header id="masthead" class="site-header" role="banner">
<div class="site-branding">
<?php
$logourl = get_theme_mod('header_logo');
$logo = ( !empty($logourl) ) ? '<a href="' . esc_url( home_url( '/' ) ) . '" rel="home" class="logo"><img src="' . $logourl . '" class="logo"></a>' : '' ;
$description = get_bloginfo( 'description', 'display' );
$blogname = get_bloginfo( 'name' );
$showdesc = ( ! empty( $description ) || is_customize_preview() ) ? '<p class="site-description">' . esc_html( $description ) . '</p>' : ' ' ;
$blogdesc = '<h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . $blogname . '</a></h1>' . $showdesc . '';
$blogdeschiddensmall = '<h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . $blogname . '</a></h1>' . $showdesc ;
$blogdeschiddenlarge = '<h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . $blogname . '</a></h1>' . $showdesc ;
switch ($displayheader) {
case 'none':
echo $logo;
break;
case 'above-large' :
echo $blogdeschiddensmall;
echo $logo;
break;
case 'above-both' :
echo $blogdesc;
echo $logo;
break;
case 'below-large':
echo $logo;
echo $blogdeschiddensmall;
break;
case 'below-both' :
echo $logo;
echo $blogdesc;
break;
case 'right' :
echo $logo;
echo $blogdeschiddenlarge;
break;
default:
echo $logo;
}
?>
<button class="secondary-toggle"><?php esc_html_e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
</div><!-- .site-branding -->
</header><!-- .site-header -->
<?php get_sidebar(); ?>
</div><!-- .sidebar -->
<div id="content" class="site-content">