mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-17 15:45:44 +03:00
Theme: Initial commit.
This was forked from `pub/wporg-main` and `pub/wporg-plugins`, and then customized.
This commit is contained in:
commit
de191e098b
38 changed files with 4532 additions and 0 deletions
59
themes/wporg-5ftf/header.php
Normal file
59
themes/wporg-5ftf/header.php
Normal file
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
namespace WordPressdotorg\Five_for_the_Future\Theme;
|
||||
|
||||
global $wporg_global_header_options;
|
||||
$GLOBALS['pagetitle'] = wp_get_document_title();
|
||||
|
||||
if ( ! isset( $wporg_global_header_options[ 'in_wrapper' ] ) ) {
|
||||
$wporg_global_header_options[ 'in_wrapper' ] = '';
|
||||
}
|
||||
|
||||
$wporg_global_header_options[ 'in_wrapper' ] .= '<a class="skip-link screen-reader-text" href="#main">' . esc_html__( 'Skip to content', 'wporg-5ftf' ) . '</a>';
|
||||
|
||||
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 -->
|
Loading…
Add table
Add a link
Reference in a new issue