forked from cyberchimps/responsive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
93 lines (83 loc) · 3.3 KB
/
header.php
File metadata and controls
93 lines (83 loc) · 3.3 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
<?php
/**
* Header Template
*
* @file header.php
* @package Responsive
* @author CyberChimps
* @copyright 2020 CyberChimps
* @license license.txt
* @version Release: 1.3
* @filesource wp-content/themes/responsive/header.php
* @link http://codex.wordpress.org/Theme_Development#Document_Head_.28header.php.29
* @since available since Release 1.0
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<!doctype html>
<html class="no-js" <?php language_attributes(); ?> > <!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="profile" href="http://gmpg.org/xfn/11"/>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"/>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?> <?php responsive_schema_markup( 'body' ); ?> >
<?php wp_body_open(); ?>
<?php Responsive\responsive_header(); // before header hook. ?>
<div class="skip-container cf">
<a class="skip-link screen-reader-text focusable" href="#primary"><?php esc_html_e( '↓ Skip to Main Content', 'responsive' ); ?></a>
</div><!-- .skip-container -->
<div class="site hfeed">
<?php
Responsive\responsive_header_top();
$responsive_show_header = true;
if ( class_exists( 'Responsive_Addons_Pro' ) ) {
if ( ( 1 === get_theme_mod( 'responsive_distraction_free_woocommerce', 0 ) ) && (
( is_shop() && 1 === get_theme_mod( 'responsive_disable_shop_header_footer', 0 ) )
|| ( is_product() && 1 === get_theme_mod( 'responsive_disable_single_product_header_footer', 0 ) )
|| ( is_cart() && 1 === get_theme_mod( 'responsive_disable_cart_header_footer', 0 ) )
|| ( is_checkout() && 1 === get_theme_mod( 'responsive_disable_checkout_header_footer', 0 ) )
|| ( is_account_page() && 1 === get_theme_mod( 'responsive_disable_account_header_footer', 0 ) )
|| ( is_product_category() && 1 === get_theme_mod( 'responsive_disable_product_category_header_footer', 0 ) )
|| ( is_product_tag() && 1 === get_theme_mod( 'responsive_disable_product_tag_header_footer', 0 ) )
)
) {
$responsive_show_header = false;
}
}
// Elementor `header` location.
if ( ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'header' ) ) && ! ( function_exists( 'rea_theme_template_render_at_location' ) && rea_theme_template_render_at_location( 'header' ) ) && $responsive_show_header ) {
// Replaces default header with custom header.
Responsive\responsive_custom_header();
if ( ! has_action( 'responsive_custom_header' ) ) {
?>
<header id="masthead" class="site-header" role="banner" <?php responsive_schema_markup( 'site-header' ); ?> >
<div class="container">
<div class="row">
<?php
// Get elements.
$responsive_header_elements = get_theme_mod(
'responsive_header_elements',
array(
'site-branding',
'main-navigation',
)
);
// Loop through elements.
foreach ( $responsive_header_elements as $element ) {
get_template_part( 'partials/header/' . $element );
}
?>
</div>
</div>
</header>
<?php
}
}
Responsive\responsive_header_bottom();
?>