Making WordPress.org


Ignore:
Timestamp:
08/13/2020 11:43:14 PM (6 years ago)
Author:
coreymckrill
Message:

WordPress.org Learn: Sync with GitHub

​https://github.com/WordPress/learn/compare/1accd3db38a60230689bdc157f9e82081d35d163...38e7793fd20434d72ca898988d017ba2009fb677

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/header.php

    r10166 r10169  
    1313
    1414global $wporg_global_header_options;
    15 if ( !isset( $wporg_global_header_options['in_wrapper'] ) )
     15if ( ! isset( $wporg_global_header_options['in_wrapper'] ) ) {
    1616        $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>';
    1819wporg_get_global_header();
    1920
    … …  
    2122
    2223<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>
    2425
    2526        <div id="content">
    2627                <header id="masthead" class="site-header <?php echo is_front_page() ? 'home' : ''; ?>" role="banner">
    2728                        <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>
    3231
    3332                                <p class="site-description">
    3433                                        <?php
    3534                                        /* Translators: subhead */
    36                                         _e('Whether you&#8217;re a first-time blogger or seasoned developer, there&#8217;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&#8217;re a first-time blogger or seasoned developer, there&#8217;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' );
    3736                                        ?>
    3837                                </p>
    3938
    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>
    4746
    48                                 <?php
    49                                 } elseif ( is_page() ) {
    50                                 ?>
     47                                <?php elseif ( is_page() ) : ?>
    5148                                <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                                                 <button
    58                                                         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>
    6461
    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
    7573                        </div><!-- .site-branding -->
    7674                </header><!-- #masthead -->
Note: See TracChangeset for help on using the changeset viewer.