-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathheader.php
More file actions
67 lines (56 loc) · 2.21 KB
/
header.php
File metadata and controls
67 lines (56 loc) · 2.21 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
<?php
/**
* The template for displaying the header.
*
* Displays all of the <head> section and everything up to the "content" div.
*
* @package Memberlite
*/
?><!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php do_action( 'memberlite_before_page' ); ?>
<div id="page" class="hfeed site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'memberlite' ); ?></a>
<?php if ( ! memberlite_hide_page_header() ) { ?>
<?php do_action( 'memberlite_before_site_header' ); ?>
<?php
$header_post_name = memberlite_get_current_header_post_name();
$header_class = 'site-header';
if ( ! memberlite_is_default_header_active() ) {
$header_class .= ' is-header-variation';
$header_class .= ' site-header-' . sanitize_html_class( $header_post_name );
} else {
$header_class .= ' site-header-default';
}
?>
<header class="<?php echo esc_attr( $header_class ); ?>" role="banner">
<?php memberlite_the_header_edit_link( $header_post_name ); ?>
<?php if ( memberlite_is_default_header_active() ) {
get_template_part( 'components/header/variation', 'default' );
} else {
get_template_part( 'components/header/header', 'mobile-row' );
$is_sticky = memberlite_is_header_variation_sticky( $header_post_name );
if ( $is_sticky ) { ?><div class="site-header-variation-sticky-wrapper"><?php } ?>
<div class="site-header-variation">
<?php
if ( ! memberlite_render_header_variation( $header_post_name ) ) {
get_template_part( 'components/header/variation', 'default' );
}
?>
</div>
<?php if ( $is_sticky ) { ?></div><!-- .site-header-variation-sticky-wrapper --><?php } ?>
<?php
get_template_part( 'components/header/header', 'mobile-menu' );
} ?>
</header><!-- #masthead -->
<?php } // End if memberlite_hide_page_header is false ?>
<?php do_action( 'memberlite_before_content' ); ?>
<div id="content" class="site-content">
<?php get_template_part( 'components/header/header', 'masthead' ); ?>