Make WordPress Core

Changes between Initial Version and Version 5 of Ticket #23152


Ignore:
Timestamp:
01/09/2013 11:58:24 PM (12 years ago)
Author:
DrewAPicture
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23152

    • Property Cc xoodrew@… added
    • Property Keywords needs-patch added; dev-feedback removed
    • Property Milestone changed from Awaiting Review to 3.6
  • Ticket #23152 – Description

    initial v5  
    11There is navigation part in twentytwelve_content_nav function:
    22
    3 
    43{{{
    5                 <nav id="<?php echo $html_id; ?>" class="navigation" role="navigation">
    6                         <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
    7                         <div class="nav-previous alignleft"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div>
    8                         <div class="nav-next alignright"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?></div>
    9                 </nav><!-- #<?php echo $html_id; ?> .navigation -->
     4<nav id="<?php echo $html_id; ?>" class="navigation" role="navigation">
     5        <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
     6        <div class="nav-previous alignleft"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div>
     7        <div class="nav-next alignright"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?></div>
     8</nav><!-- #<?php echo $html_id; ?> .navigation -->
    109}}}
    1110
    1211We do not need CSS classes .alignleft and .alignright here, because the .nav-previous and .nav-next already have float properties in style.css. In one case this made the links appear in different lines while constructing the child theme. Although it didn't affect vanilla Twenty Twelve. The code could be just:
    1312
    14 
    1513{{{
    16                 <nav id="<?php echo $html_id; ?>" class="navigation" role="navigation">
    17                         <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
    18                         <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div>
    19                         <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?></div>
    20                 </nav><!-- #<?php echo $html_id; ?> .navigation -->
     14<nav id="<?php echo $html_id; ?>" class="navigation" role="navigation">
     15        <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
     16        <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div>
     17        <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?></div>
     18</nav><!-- #<?php echo $html_id; ?> .navigation -->
    2119}}}