-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathheader.php
More file actions
212 lines (185 loc) · 6.1 KB
/
Copy pathheader.php
File metadata and controls
212 lines (185 loc) · 6.1 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
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
<?php
/**
* The header for our theme.
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Flash
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php
/**
* WordPress function to load custom scripts after body.
*
* Introduced in WordPress 5.2.0
*
* @since Flash 1.3.0
*/
if ( function_exists( 'wp_body_open' ) ) {
wp_body_open();
}
?>
<?php
if ( get_theme_mod( 'flash_disable_preloader', '' ) != 1 ) : ?>
<div id="preloader-background">
<div id="spinners">
<div id="preloader">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
</div>
<?php endif; ?>
<?php
/**
* flash_before hook
*/
do_action( 'flash_before' ); ?>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'flash' ); ?></a>
<?php
/**
* flash_before_header hook
*/
do_action( 'flash_before_header' ); ?>
<header id="masthead" class="site-header" role="banner">
<?php
if ( get_theme_mod( 'flash_top_header', '1') == '1' ) : ?>
<div class="header-top">
<div class="tg-container">
<div class="tg-column-wrapper clearfix">
<div class="left-content">
<?php echo flash_top_header_content( 'flash_top_header_left' ); ?>
</div>
<div class="right-content">
<?php echo flash_top_header_content( 'flash_top_header_right' ); ?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<div class="header-bottom">
<div class="tg-container">
<div class="logo">
<?php if( function_exists( 'the_custom_logo' ) && has_custom_logo() ) : ?>
<figure class="logo-image">
<?php flash_the_custom_logo(); ?>
<?php if( get_theme_mod( 'flash_transparent_logo', '') != '') : ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<img class="transparent-logo" src="<?php echo esc_url( get_theme_mod( 'flash_transparent_logo', '' ) ); ?>" />
</a>
<?php endif; ?>
</figure>
<?php endif; ?>
<div class="logo-text site-branding">
<?php
if ( ( is_front_page() && is_home() ) || ( is_front_page() && !is_home() ) ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php
endif;
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) : ?>
<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
<?php
endif; ?>
</div>
</div>
<div class="site-navigation-wrapper">
<nav id="site-navigation" class="main-navigation" role="navigation">
<div class="menu-toggle">
<i class="fa fa-bars"></i>
</div>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' ) ); ?>
</nav><!-- #site-navigation -->
<?php $logo_position = get_theme_mod( 'flash_logo_position', 'left-logo-right-menu' ); ?>
<?php if ( $logo_position == 'center-logo-below-menu' ): ?>
<div class="header-action-container">
<?php if( ( get_theme_mod( 'flash_header_cart', '' ) != '1' ) && class_exists( 'WooCommerce' ) ) :
$cart_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : WC()->cart->get_cart_url();
?>
<div class="cart-wrap">
<div class="flash-cart-views">
<a href="<?php echo esc_url( $cart_url ); ?>" class="wcmenucart-contents">
<i class="fa fa-opencart"></i>
<span class="cart-value"><?php echo wp_kses_data ( WC()->cart->get_cart_contents_count() ); ?></span>
</a>
</div>
<?php the_widget( 'WC_Widget_Cart', '' ); ?>
</div>
<?php endif; ?>
<?php if( get_theme_mod( 'flash_header_search', '' ) != '1' ) : ?>
<div class="search-wrap">
<div class="search-icon">
<i class="fa fa-search"></i>
</div>
<div class="search-box">
<?php get_search_form(); ?>
</div>
</div>
<?php endif; ?>
</div>
<?php endif ?>
</div>
<div class="header-action-container">
<?php if( ( get_theme_mod( 'flash_header_cart', '' ) != '1' ) && class_exists( 'WooCommerce' ) && isset( WC()->cart ) ) : ?>
<div class="cart-wrap">
<div class="flash-cart-views">
<?php $cart_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : WC()->cart->get_cart_url(); ?>
<a href="<?php echo esc_url( $cart_url ); ?>" class="wcmenucart-contents">
<i class="fa fa-opencart"></i>
<span class="cart-value"><?php echo wp_kses_data ( WC()->cart->get_cart_contents_count() ); ?></span>
</a>
</div>
<?php the_widget( 'WC_Widget_Cart', '' ); ?>
</div>
<?php endif; ?>
<?php if( get_theme_mod( 'flash_header_search', '' ) != '1' ) : ?>
<div class="search-wrap">
<div class="search-icon">
<i class="fa fa-search"></i>
</div>
<div class="search-box">
<?php get_search_form(); ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</div>
</header><!-- #masthead -->
<?php
/**
* flash_after_header hook
*/
do_action( 'flash_after_header' ); ?>
<?php get_template_part( 'template-parts/header-media' ); ?>
<?php if( !is_front_page() ) : ?>
<nav id="flash-breadcrumbs" class="breadcrumb-trail breadcrumbs">
<div class="tg-container">
<?php flash_page_title(); ?>
<?php flash_breadcrumbs(); ?>
</div>
</nav>
<?php endif; ?>
<?php
/**
* flash_before_main hook
*/
do_action( 'flash_before_main' ); ?>
<div id="content" class="site-content">
<div class="tg-container">