Changeset 10169 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/header.php
- Timestamp:
- 08/13/2020 11:43:14 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/header.php
r10166 r10169 13 13 14 14 global $wporg_global_header_options; 15 if ( ! isset( $wporg_global_header_options['in_wrapper'] ) )15 if ( ! isset( $wporg_global_header_options['in_wrapper'] ) ) { 16 16 $wporg_global_header_options['in_wrapper'] = ''; 17 $wporg_global_header_options['in_wrapper'] .= '<a class="skip-link screen-reader-text" href="#content">' . esc_html__( 'Skip to content', 'wporg-forums' ) . '</a>'; 17 } 18 $wporg_global_header_options['in_wrapper'] .= '<a class="skip-link screen-reader-text" href="#content">' . esc_html__( 'Skip to content', 'wporg-learn' ) . '</a>'; 18 19 wporg_get_global_header(); 19 20 … … 21 22 22 23 <div id="page" class="site"> 23 <a class="skip-link screen-reader-text" href="#main"><?php esc_html_e( 'Skip to content', 'wporg- forums' ); ?></a>24 <a class="skip-link screen-reader-text" href="#main"><?php esc_html_e( 'Skip to content', 'wporg-learn' ); ?></a> 24 25 25 26 <div id="content"> 26 27 <header id="masthead" class="site-header <?php echo is_front_page() ? 'home' : ''; ?>" role="banner"> 27 28 <div class="site-branding"> 28 <?php 29 if ( is_front_page() ) { 30 ?> 31 <h1 class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php _ex('Learn WordPress', 'Site title', 'wporg-forums'); ?></a></h1> 29 <?php if ( is_front_page() ) : ?> 30 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo esc_html( _x( 'Learn WordPress', 'Site title', 'wporg-learn' ) ); ?></a></h1> 32 31 33 32 <p class="site-description"> 34 33 <?php 35 34 /* Translators: subhead */ 36 _e('Whether you’re a first-time blogger or seasoned developer, there’s always more to learn. From community members all over the world, these vast resources will help you learn more about WordPress and teach it to others.', 'wporg-forums');35 esc_html_e( 'Whether you’re a first-time blogger or seasoned developer, there’s always more to learn. From community members all over the world, these vast resources will help you learn more about WordPress and teach it to others.', 'wporg-learn' ); 37 36 ?> 38 37 </p> 39 38 40 <form role="search" method="get" class="search-form" action="<?php esc_url( home_url( '/' ) )?>">41 <label>42 <span class="screen-reader-text"><?php _e('Search for:', 'wporg-forums' )?></span>43 <input type="search" class="search-field" placeholder="<?php esc_attr_e( 'Search a teaching resource', 'wporg-forums' )?>" value="<?php get_search_query()?>" name="s" />44 </label>45 <button type="submit" class="search-submit button button-primary button-search"><i class="dashicons dashicons-search"></i><span class="screen-reader-text"><?php esc_attr_e( 'Search', 'wporg-forums' )?></span></button>46 </form>39 <form role="search" method="get" class="search-form" action="<?php esc_url( home_url( '/' ) ); ?>"> 40 <label> 41 <span class="screen-reader-text"><?php esc_html_e( 'Search for:', 'wporg-learn' ); ?></span> 42 <input type="search" class="search-field" placeholder="<?php esc_attr_e( 'Search a teaching resource', 'wporg-learn' ); ?>" value="<?php get_search_query(); ?>" name="s" /> 43 </label> 44 <button type="submit" class="search-submit button button-primary button-search"><i class="dashicons dashicons-search"></i><span class="screen-reader-text"><?php esc_attr_e( 'Search', 'wporg-learn' ); ?></span></button> 45 </form> 47 46 48 <?php 49 } elseif ( is_page() ) { 50 ?> 47 <?php elseif ( is_page() ) : ?> 51 48 <h1 class="site-title"><a href="<?php echo esc_url( get_the_permalink() ); ?>" rel="home"><?php the_title(); ?></a></h1> 52 <?php 53 } else {54 ?>55 <p class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php _ex('Learn WordPress', 'Site title', 'wporg-forums'); ?></a></p>56 <nav id="site-navigation" class="main-navigation" role="navigation">57 <button58 class="menu-toggle dashicons dashicons-arrow-down-alt2"59 aria-controls="primary-menu"60 aria-expanded="false"61 aria-label="<?php esc_attr_e( 'Primary Menu', 'wporg-learn' ); ?>"62 >63 </button>49 <?php else : ?> 50 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> 51 <?php echo esc_html( _x( 'Learn WordPress', 'Site title', 'wporg-learn' ) ); ?> 52 </a></p> 53 <nav id="site-navigation" class="main-navigation" role="navigation"> 54 <button 55 class="menu-toggle dashicons dashicons-arrow-down-alt2" 56 aria-controls="primary-menu" 57 aria-expanded="false" 58 aria-label="<?php esc_attr_e( 'Primary Menu', 'wporg-learn' ); ?>" 59 > 60 </button> 64 61 65 <div id="primary-menu" class="menu"> 66 <?php 67 wp_nav_menu( array( 68 'theme_location' => 'primary', 69 'menu_id' => 'primary-menu', 70 ) ); 71 ?> 72 </div> 73 </nav><!-- #site-navigation --> 74 <?php } ?> 62 <div id="primary-menu" class="menu"> 63 <?php 64 wp_nav_menu( array( 65 'theme_location' => 'primary', 66 'menu_id' => 'primary-menu', 67 ) ); 68 ?> 69 </div> 70 </nav><!-- #site-navigation --> 71 <?php endif; ?> 72 75 73 </div><!-- .site-branding --> 76 74 </header><!-- #masthead -->
Note: See TracChangeset
for help on using the changeset viewer.