Repository navigation
Expand file tree
/
Copy pathheader.php
More file actions
89 lines (77 loc) · 3.78 KB
/
Copy pathheader.php
File metadata and controls
89 lines (77 loc) · 3.78 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
<?php
/* *
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="content">
*
* @package sparkling
*/
?>
<!doctype html>
<html class="no-js" <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php $sparkling_theme_color = function_exists( 'sparkling_css_color' ) ? sparkling_css_color( 'nav_bg_color' ) : ''; ?>
<?php if ( $sparkling_theme_color ) : ?>
<meta name="theme-color" content="<?php echo esc_attr( $sparkling_theme_color ); ?>">
<?php endif; ?>
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<a class="sr-only sr-only-focusable" href="#content"><?php esc_html_e( 'Skip to main content', 'sparkling' ); ?></a>
<div id="page" class="hfeed site">
<header id="masthead" class="site-header">
<nav class="navbar navbar-default<?php echo of_get_option( 'sticky_header' ) ? ' navbar-fixed-top' : ''; ?>" aria-label="<?php esc_attr_e( 'Primary', 'sparkling' ); ?>">
<div class="container">
<div class="row">
<div class="site-navigation-inner col-sm-12">
<div class="navbar-header">
<?php
/*
* The site name is the page's h1 only on the latest-posts front
* page. Everywhere else the view has its own h1 -- the post,
* page, archive or search title -- and a second one here made
* two per page (the separate blog page had both).
*/
$sparkling_site_name_tag = is_front_page() && is_home() ? 'h1' : 'p';
?>
<div id="logo">
<?php if ( get_header_image() ) : ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><img src="<?php header_image(); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"/></a>
<?php if ( 'h1' === $sparkling_site_name_tag ) : ?>
<h1 class="site-name hide-site-name"><?php bloginfo( 'name' ); ?></h1>
<?php endif; ?>
<?php else : ?>
<<?php echo esc_html( $sparkling_site_name_tag ); ?> class="site-name"><a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></<?php echo esc_html( $sparkling_site_name_tag ); ?>>
<?php endif; ?>
</div><!-- end of #logo -->
<button type="button" class="btn navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse" aria-controls="sparkling-navbar" aria-expanded="false">
<span class="sr-only"><?php esc_html_e( 'Toggle navigation', 'sparkling' ); ?></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<?php sparkling_header_menu(); // main navigation ?>
</div>
</div>
</div>
</nav><!-- .site-navigation -->
</header><!-- #masthead -->
<div id="content" class="site-content">
<?php
// The front page slider and call to action, when there are any.
ob_start();
sparkling_featured_slider();
sparkling_call_for_action();
$sparkling_top_section = trim( ob_get_clean() );
?>
<div class="top-section"<?php echo '' !== $sparkling_top_section ? ' role="region" aria-label="' . esc_attr__( 'Featured', 'sparkling' ) . '"' : ''; ?>>
<?php echo $sparkling_top_section; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped by the two functions above. ?>
</div>
<div class="container main-content-area">
<div class="row <?php echo esc_attr( get_layout_class() ); ?>">
<div class="main-content-inner <?php echo esc_attr( sparkling_main_content_bootstrap_classes() ); ?>">