Making WordPress.org


Ignore:
Timestamp:
08/13/2020 07:12:23 PM (6 years ago)
Author:
coreymckrill
Message:

WordPress.org Learn: Sync with GitHub

https://github.com/WordPress/learn/compare/1648a7fc9a72a518bd1901cf18fa72efe90a4c4b...1accd3db38a60230689bdc157f9e82081d35d163

File:
1 edited

Legend:

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

    r10147 r10166  
    1111
    1212namespace WordPressdotorg\Forums;
    13 
    14 $menu_items = array(
    15     /* translators: relative link to the forums home page */
    16     _x( '/forums/', 'header menu', 'wporg-forums' )                                     => _x( 'Forums', 'header menu', 'wporg-forums' ),
    17     _x( 'https://codex.wordpress.org/Main_Page', 'header menu', 'wporg-forums' )        => _x( 'Documentation', 'header menu', 'wporg-forums' ),
    18     _x( 'https://make.wordpress.org/support/handbook/', 'header menu', 'wporg-forums' ) => _x( 'Get Involved', 'header menu', 'wporg-forums' ),
    19 );
    2013
    2114global $wporg_global_header_options;
     
    5245                    <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>
    5346                </form>
    54                        
     47
    5548                <?php
    5649                } elseif ( is_page() ) {
     
    6154                ?>
    6255                    <p class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php _ex('Learn WordPress', 'Site title', 'wporg-forums'); ?></a></p>
    63                     <?php /*
    6456                    <nav id="site-navigation" class="main-navigation" role="navigation">
    65                         <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-forums' ); ?>"></button>
     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>
     64
    6665                        <div id="primary-menu" class="menu">
    67                             <ul>
    68                                 <?php
    69                                 foreach ( $menu_items as $path => $text ) :
    70                                     $class = '';
    71                                     $url = parse_url( $path );
    72                                     if ( ! empty( $url['host' ] ) ) {
    73                                         $url = esc_url( $path );
    74                                     } else {
    75                                         $class = false !== strpos( $_SERVER['REQUEST_URI'], $url['path'] ) ? 'class="active" ' : '';
    76                                         $url = esc_url( home_url( $path ) );
    77                                     }
    78                                 ?>
    79                                 <li class="page_item"><a <?php echo $class; ?>href="<?php echo $url; ?>"><?php echo esc_html( $text ); ?></a></li>
    80                                 <?php endforeach; ?>
    81                                 <li><?php get_search_form(); ?></li>
    82                             </ul>
     66                            <?php
     67                            wp_nav_menu( array(
     68                                'theme_location' => 'primary',
     69                                'menu_id'        => 'primary-menu',
     70                            ) );
     71                            ?>
    8372                        </div>
    8473                    </nav><!-- #site-navigation -->
    85                     */ ?>
    8674                <?php } ?>
    8775            </div><!-- .site-branding -->
Note: See TracChangeset for help on using the changeset viewer.