Revert "Merge branch 'pr/667'"

This reverts commit a7c2f89982.

Been meaning to give proper attribution, but Git lost the commit after
I edited the merge commit.

See #667.
This commit is contained in:
Konstantin Obenland 2015-01-07 09:40:24 -08:00
parent a7c2f89982
commit e6366f4474
9 changed files with 75 additions and 68 deletions

View file

@ -7,28 +7,26 @@
* @package _s
*/
if ( ! function_exists( 'the_posts_navigation' ) ) :
if ( ! function_exists( '_s_paging_nav' ) ) :
/**
* Display navigation to next/previous set of posts when applicable.
*
* @todo Remove this function when WordPress 4.3 is released.
*/
function the_posts_navigation() {
function _s_paging_nav() {
// Don't print empty markup if there's only one page.
if ( $GLOBALS['wp_query']->max_num_pages < 2 ) {
return;
}
?>
<nav class="navigation posts-navigation" role="navigation">
<h2 class="screen-reader-text"><?php _e( 'Posts navigation', '_s' ); ?></h2>
<nav class="navigation paging-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Posts navigation', '_s' ); ?></h1>
<div class="nav-links">
<?php if ( get_next_posts_link() ) : ?>
<div class="nav-previous"><?php next_posts_link( __( 'Older posts', '_s' ) ); ?></div>
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', '_s' ) ); ?></div>
<?php endif; ?>
<?php if ( get_previous_posts_link() ) : ?>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts', '_s' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', '_s' ) ); ?></div>
<?php endif; ?>
</div><!-- .nav-links -->
@ -37,13 +35,11 @@ function the_posts_navigation() {
}
endif;
if ( ! function_exists( 'the_post_navigation' ) ) :
if ( ! function_exists( '_s_post_nav' ) ) :
/**
* Display navigation to next/previous post when applicable.
*
* @todo Remove this function when WordPress 4.3 is released.
*/
function the_post_navigation() {
function _s_post_nav() {
// Don't print empty markup if there's nowhere to navigate.
$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
$next = get_adjacent_post( false, '', false );
@ -53,11 +49,11 @@ function the_post_navigation() {
}
?>
<nav class="navigation post-navigation" role="navigation">
<h2 class="screen-reader-text"><?php _e( 'Post navigation', '_s' ); ?></h2>
<h1 class="screen-reader-text"><?php _e( 'Post navigation', '_s' ); ?></h1>
<div class="nav-links">
<?php
previous_post_link( '<div class="nav-previous">%link</div>', '%title' );
next_post_link( '<div class="nav-next">%link</div>', '%title' );
previous_post_link( '<div class="nav-previous">%link</div>', _x( '<span class="meta-nav">&larr;</span>&nbsp;%title', 'Previous post link', '_s' ) );
next_post_link( '<div class="nav-next">%link</div>', _x( '%title&nbsp;<span class="meta-nav">&rarr;</span>', 'Next post link', '_s' ) );
?>
</div><!-- .nav-links -->
</nav><!-- .navigation -->