WordPress.org

Make WordPress Core

Ticket #22690: 22690.diff

File 22690.diff, 1.1 KB (added by nacin, 2 years ago)
  • wp-content/themes/twentytwelve/functions.php

     
    240240 * 
    241241 * @since Twenty Twelve 1.0 
    242242 */ 
    243 function twentytwelve_content_nav( $nav_id ) { 
     243function twentytwelve_content_nav( $html_id ) { 
    244244        global $wp_query; 
    245245 
     246        $html_id = esc_attr( $html_id ); 
     247 
    246248        if ( $wp_query->max_num_pages > 1 ) : ?> 
    247                 <nav id="<?php echo $nav_id; ?>" class="navigation" role="navigation"> 
     249                <nav id="<?php echo $html_id; ?>" class="navigation" role="navigation"> 
    248250                        <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3> 
    249251                        <div class="nav-previous alignleft"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div> 
    250252                        <div class="nav-next alignright"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?></div> 
    251                 </nav><!-- #<?php echo $nav_id; ?> .navigation --> 
     253                </nav><!-- #<?php echo $html_id; ?> .navigation --> 
    252254        <?php endif; 
    253255} 
    254256endif;