diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index 676e6c955fd21..5adfa43bd249a 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -414,14 +414,28 @@ function wp_get_list_item_separator() { function twentytwelve_content_nav( $html_id ) { global $wp_query; - if ( $wp_query->max_num_pages > 1 ) : ?> + if ( $wp_query->max_num_pages > 1 ) : + $order = get_query_var( 'order', 'DESC' ); + $is_desc = ( 'DESC' === $order ); + + $new_posts_text = __( 'Newer posts ', 'twentytwelve' ); + $old_posts_text = __( ' Older posts', 'twentytwelve' ); + + $prev_link = $is_desc ? get_next_posts_link( $old_posts_text ) : get_previous_posts_link( $old_posts_text ); + $next_link = $is_desc ? get_previous_posts_link( $new_posts_text ) : get_next_posts_link( $new_posts_text ); + ?>