Changeset 10231 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/header.php
- Timestamp:
- 09/03/2020 01:57:15 AM (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
r10169 r10231 18 18 $wporg_global_header_options['in_wrapper'] .= '<a class="skip-link screen-reader-text" href="#content">' . esc_html__( 'Skip to content', 'wporg-learn' ) . '</a>'; 19 19 wporg_get_global_header(); 20 21 $menu_items = array( 22 '/workshops/' => __( 'Workshops', 'wporg-learn' ), 23 '/lesson-plans/' => __( 'Lesson Plans', 'wporg-learn' ), 24 '/workshop-presenter-application/' => __( 'Submit a Workshop', 'wporg-learn' ), 25 ); 20 26 21 27 ?> … … 40 46 <label> 41 47 <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" />48 <input type="search" class="search-field" placeholder="<?php esc_attr_e( 'Search for a teaching resource', 'wporg-learn' ); ?>" value="<?php get_search_query(); ?>" name="s" /> 43 49 </label> 44 50 <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> … … 48 54 <h1 class="site-title"><a href="<?php echo esc_url( get_the_permalink() ); ?>" rel="home"><?php the_title(); ?></a></h1> 49 55 <?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> 56 <p class="site-title"> 57 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> 58 <?php echo esc_html( _x( 'Learn', 'Site title', 'wporg-learn' ) ); ?> 59 <span class="site-title--no-mobile"><?php echo esc_html( _x( 'WordPress', 'Site title', 'wporg-learn' ) ); ?></span> 60 </a> 61 </p> 53 62 <nav id="site-navigation" class="main-navigation" role="navigation"> 54 63 <button … … 59 68 > 60 69 </button> 61 62 70 <div id="primary-menu" class="menu"> 63 <?php 64 wp_nav_menu( array( 65 'theme_location' => 'primary', 66 'menu_id' => 'primary-menu', 67 ) ); 68 ?> 71 <ul> 72 <?php 73 foreach ( $menu_items as $url_path => $text ) : 74 $class = false !== strpos( $_SERVER['REQUEST_URI'], $url_path ) ? 'active' : ''; // phpcs:ignore 75 ?> 76 <li class="page_item"> 77 <a class="<?php echo esc_attr( $class ); ?>" href="<?php echo esc_url( home_url( $url_path ) ); ?>"> 78 <?php echo esc_html( $text ); ?> 79 </a> 80 </li> 81 <?php endforeach; ?> 82 <li><?php get_search_form(); ?></li> 83 </ul> 69 84 </div> 70 85 </nav><!-- #site-navigation -->
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)