-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
77 lines (59 loc) · 2.04 KB
/
header.php
File metadata and controls
77 lines (59 loc) · 2.04 KB
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
<?php
/**
* The header template.
* @package heightwind
* @since 2.0.0
*/
?>
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?><?php heightwind_html_before(); ?><!doctype html>
<html <?php language_attributes(); ?> class="no-js" data-color-scheme="<?php echo esc_attr( get_theme_mod( 'heightwind_color_scheme', 'auto' ) ); ?>">
<head>
<?php heightwind_head_top(); ?>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php // Color scheme early script to prevent flash of wrong colors ?>
<script>
(function() {
// Skip localStorage override when in Customizer preview
var isCustomizerPreview = false;
try {
if (window && window.parent && window.parent !== window && window.parent.wp && window.parent.wp.customize) {
isCustomizerPreview = true;
}
} catch (e) {
// Accessing window.parent or its properties can throw in cross-origin iframes.
isCustomizerPreview = false;
}
var stored = null;
if (!isCustomizerPreview) {
try {
if (window && window.localStorage) {
stored = localStorage.getItem('heightwind-user-scheme');
}
} catch (e) {
stored = null;
}
}
var admin = '<?php echo esc_js( get_theme_mod( 'heightwind_color_scheme', 'auto' ) ); ?>';
var scheme = stored || admin;
document.documentElement.setAttribute('data-color-scheme', scheme);
if (stored) {
document.documentElement.setAttribute('data-user-scheme', stored);
}
})();
</script>
<?php heightwind_head_bottom(); ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php heightwind_body_top(); ?>
<div class="outer-wrap" id="top">
<div class="inner-wrap">
<?php heightwind_header_before(); ?>
<header class="header content-wrapper" role="banner" style="background-image:url(<?php echo esc_url( header_image() ); ?>);">
<?php heightwind_header(); ?>
</header>
<div class="content-wrapper">
<?php heightwind_header_after(); ?>