|
@@ -10,6 +10,11 @@
|
|
* @subpackage Varia
|
|
* @subpackage Varia
|
|
* @since 1.0.0
|
|
* @since 1.0.0
|
|
*/
|
|
*/
|
|
|
|
+$has_primary_nav = has_nav_menu( 'menu-1' );
|
|
|
|
+$header_classes = 'site-header-wrap responsive-max-width';
|
|
|
|
+$header_classes .= has_custom_logo() ? ' has-logo' : '';
|
|
|
|
+$header_classes .= 1 === get_theme_mod( 'header_text', true ) ? ' has-title-and-tagline' : '';
|
|
|
|
+$header_classes .= $has_primary_nav ? ' has-menu' : '';
|
|
?><!doctype html>
|
|
?><!doctype html>
|
|
<html <?php language_attributes(); ?>>
|
|
<html <?php language_attributes(); ?>>
|
|
<head>
|
|
<head>
|
|
@@ -32,7 +37,7 @@
|
|
|
|
|
|
<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
|
|
<?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
|
|
|
|
|
|
- <header class="fse-template-part fse-header entry-content">
|
|
|
|
|
|
+ <header id="masthead" class="fse-template-part fse-header entry-content">
|
|
<?php
|
|
<?php
|
|
$template = new A8C\FSE\WP_Template();
|
|
$template = new A8C\FSE\WP_Template();
|
|
$template->output_template_content( A8C\FSE\WP_Template::HEADER );
|
|
$template->output_template_content( A8C\FSE\WP_Template::HEADER );
|
|
@@ -40,15 +45,13 @@
|
|
</header>
|
|
</header>
|
|
|
|
|
|
<?php else : // Otherwise we'll fallback to the default Varia header below. ?>
|
|
<?php else : // Otherwise we'll fallback to the default Varia header below. ?>
|
|
-
|
|
|
|
- <header id="masthead" class="site-header">
|
|
|
|
-
|
|
|
|
- <div class="site-header-wrap">
|
|
|
|
-
|
|
|
|
|
|
+ <header id="masthead" class="site-header" role="banner">
|
|
|
|
+ <div class="<?php echo $header_classes; ?>">
|
|
<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
|
|
<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
|
|
|
|
|
|
- <?php if ( has_nav_menu( 'menu-1' ) ) : ?>
|
|
|
|
|
|
+ <?php if ( $has_primary_nav ) : ?>
|
|
<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'varia' ); ?>">
|
|
<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'varia' ); ?>">
|
|
|
|
+
|
|
<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
|
|
<input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
|
|
<label for="toggle" id="toggle-menu" class="button">
|
|
<label for="toggle" id="toggle-menu" class="button">
|
|
<?php _e( 'Menu', 'varia' ); ?>
|
|
<?php _e( 'Menu', 'varia' ); ?>
|
|
@@ -57,6 +60,7 @@
|
|
<span class="hide-visually expanded-text"><?php _e( 'expanded', 'varia' ); ?></span>
|
|
<span class="hide-visually expanded-text"><?php _e( 'expanded', 'varia' ); ?></span>
|
|
<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'varia' ); ?></span>
|
|
<span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'varia' ); ?></span>
|
|
</label>
|
|
</label>
|
|
|
|
+
|
|
<?php
|
|
<?php
|
|
wp_nav_menu(
|
|
wp_nav_menu(
|
|
array(
|
|
array(
|
|
@@ -70,7 +74,7 @@
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
|
|
<?php if ( has_nav_menu( 'social' ) ) : ?>
|
|
<?php if ( has_nav_menu( 'social' ) ) : ?>
|
|
- <nav class="social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'varia' ); ?>">
|
|
|
|
|
|
+ <nav class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'varia' ); ?>">
|
|
<?php
|
|
<?php
|
|
wp_nav_menu(
|
|
wp_nav_menu(
|
|
array(
|
|
array(
|
|
@@ -85,7 +89,7 @@
|
|
</nav><!-- .social-navigation -->
|
|
</nav><!-- .social-navigation -->
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
|
|
- </div>
|
|
|
|
|
|
+ </div><!-- .site-header-wrap -->
|
|
|
|
|
|
</header><!-- #masthead -->
|
|
</header><!-- #masthead -->
|
|
|
|
|