Make WordPress Core


Ignore:
Timestamp:
03/17/2014 09:49:10 PM (11 years ago)
Author:
lancewillett
Message:

Twenty Eleven: only show secondary skip link on pages with secondary content, and remove duplicate title attribute in site title output. Props bcworkz, fixes #26950.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/header.php

    r25746 r27569  
    7272    <header id="branding" role="banner">
    7373            <hgroup>
    74                 <h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
     74                <h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
    7575                <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
    7676            </hgroup>
     
    133133                <h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3>
    134134                <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
    135                 <div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div>
    136                 <div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', 'twentyeleven' ); ?>"><?php _e( 'Skip to secondary content', 'twentyeleven' ); ?></a></div>
     135                <div class="skip-link"><a class="assistive-text" href="#content"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div>
     136                <?php if ( ! is_singular() ) : ?>
     137                    <div class="skip-link"><a class="assistive-text" href="#secondary"><?php _e( 'Skip to secondary content', 'twentyeleven' ); ?></a></div>
     138                <?php endif; ?>
    137139                <?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assigned to the primary location is the one used. If one isn't assigned, the menu with the lowest ID is used. */ ?>
    138140                <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
Note: See TracChangeset for help on using the changeset viewer.