five-for-the-future/themes/wporg-5ftf/header.php
Dion Hulse 908e0973f3
Theme: Sync SVN commits to canonical Git repo.
r18240-dotorg:
Switch from using `global $pagetitle` to `add_theme_support( 'title-tags' );`.
See ​https://github.com/WordPress/wporg-mu-plugins/issues/44

r18291-dotorg:
Themes: Use a mu-plugin to output consistent skip-to links for all themes.
This is to remove the reliance upon `$wporg_global_header_options`.
See ​https://github.com/WordPress/wporg-mu-plugins/issues/42, ​https://github.com/WordPress/wporg-mu-plugins/pull/70.

r18292-dotorg:
Themes: Don't rely upon the WordPress.org header to switch out the `no-js` for `js` body class.
See ​https://github.com/WordPress/wporg-mu-plugins/issues/42
2022-03-18 12:42:05 -07:00

59 lines
1.7 KiB
PHP

<?php
namespace WordPressDotOrg\FiveForTheFuture\Theme;
\WordPressdotorg\skip_to( '#main' );
if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
echo do_blocks( '<!-- wp:wporg/global-header /-->' );
} else {
require WPORGPATH . 'header.php';
}
?>
<div id="page" class="site">
<div id="content" class="site-content">
<header id="masthead" class="site-header <?php echo is_front_page() ? 'home' : ''; ?>" role="banner">
<div class="site-branding">
<?php if ( is_front_page() ) : ?>
<h1 class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<?php echo esc_html_x( 'Five for the Future', 'Site title', 'wporg-5ftf' ); ?>
</a>
</h1>
<p class="site-description">
<?php esc_html_e( 'WordPress fuels more than a third of the web. Are you a part of it?', 'wporg-5ftf' ); ?>
</p>
<?php else : ?>
<p class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<?php echo esc_html_x( 'Five for the Future', 'Site title', 'wporg-5ftf' ); ?>
</a>
</p>
<nav id="site-navigation" class="main-navigation" role="navigation">
<button
class="menu-toggle dashicons dashicons-arrow-down-alt2"
aria-controls="primary-menu"
aria-expanded="false"
aria-label="<?php esc_attr_e( 'Primary Menu', 'wporg-5ftf' ); ?>"
>
</button>
<div id="primary-menu" class="menu">
<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu',
) );
?>
</div>
</nav><!-- #site-navigation -->
<?php endif; ?>
</div><!-- .site-branding -->
</header><!-- #masthead -->