Ticket #10219: 10219.diff
File 10219.diff, 2.3 KB (added by , 9 years ago) |
---|
-
src/wp-content/themes/twentythirteen/functions.php
259 259 global $wp_query; 260 260 261 261 // Don't print empty markup if there's only one page. 262 if ( $wp_query->max_num_pages < 2 ) 262 if ( $wp_query->max_num_pages < 2 ) { 263 263 return; 264 } 265 266 $desc = 'DESC' === get_query_var( 'order' ); 267 $next_posts = __( '<span class="meta-nav">←</span> Older posts', 'twentythirteen' ); 268 $prev_posts = __( 'Newer posts <span class="meta-nav">→</span>', 'twentythirteen' ); 269 264 270 ?> 265 271 <nav class="navigation paging-navigation" role="navigation"> 266 272 <h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1> 267 273 <div class="nav-links"> 268 274 269 275 <?php if ( get_next_posts_link() ) : ?> 270 <div class="nav- previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentythirteen' )); ?></div>276 <div class="nav-<?php echo $desc ? 'previous' : 'next'; ?>"><?php next_posts_link( $desc ? $next_posts : $prev_posts ); ?></div> 271 277 <?php endif; ?> 272 278 273 279 <?php if ( get_previous_posts_link() ) : ?> 274 <div class="nav- next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentythirteen' )); ?></div>280 <div class="nav-<?php echo $desc ? 'next' : 'previous'; ?>"><?php previous_posts_link( $desc ? $prev_posts : $next_posts ); ?></div> 275 281 <?php endif; ?> 276 282 277 283 </div><!-- .nav-links --> -
src/wp-includes/link-template.php
2428 2428 2429 2429 // Don't print empty markup if there's only one page. 2430 2430 if ( $GLOBALS['wp_query']->max_num_pages > 1 ) { 2431 $desc = 'DESC' === get_query_var( 'order' ); 2431 2432 $args = wp_parse_args( $args, array( 2432 'prev_text' => __( 'Older posts' ),2433 'next_text' => __( 'Newer posts' ),2433 'prev_text' => $desc ? __( 'Older posts' ) : __( 'Newer posts' ), 2434 'next_text' => $desc ? __( 'Newer posts' ) : __( 'Older posts' ), 2434 2435 'screen_reader_text' => __( 'Posts navigation' ), 2435 2436 ) ); 2436 2437