forked from mirror/_s
_s: Re-introduce `nav-` prefix for previous/next links.
This way we can select both links with `[class*="nav-"]`.
This commit is contained in:
parent
ee7323950a
commit
6056c1ed66
|
@ -36,8 +36,8 @@
|
||||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
|
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
|
||||||
<nav id="comment-nav-above" class="navigation-comment" role="navigation">
|
<nav id="comment-nav-above" class="navigation-comment" role="navigation">
|
||||||
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
|
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
|
||||||
<div class="previous"><?php previous_comments_link( __( '← Older Comments', '_s' ) ); ?></div>
|
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', '_s' ) ); ?></div>
|
||||||
<div class="next"><?php next_comments_link( __( 'Newer Comments →', '_s' ) ); ?></div>
|
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', '_s' ) ); ?></div>
|
||||||
</nav><!-- #comment-nav-before -->
|
</nav><!-- #comment-nav-before -->
|
||||||
<?php endif; // check for comment navigation ?>
|
<?php endif; // check for comment navigation ?>
|
||||||
|
|
||||||
|
@ -56,8 +56,8 @@
|
||||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
|
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
|
||||||
<nav id="comment-nav-below" class="navigation-comment" role="navigation">
|
<nav id="comment-nav-below" class="navigation-comment" role="navigation">
|
||||||
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
|
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', '_s' ); ?></h1>
|
||||||
<div class="previous"><?php previous_comments_link( __( '← Older Comments', '_s' ) ); ?></div>
|
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', '_s' ) ); ?></div>
|
||||||
<div class="next"><?php next_comments_link( __( 'Newer Comments →', '_s' ) ); ?></div>
|
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', '_s' ) ); ?></div>
|
||||||
</nav><!-- #comment-nav-below -->
|
</nav><!-- #comment-nav-below -->
|
||||||
<?php endif; // check for comment navigation ?>
|
<?php endif; // check for comment navigation ?>
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@ get_header();
|
||||||
</div><!-- .entry-meta -->
|
</div><!-- .entry-meta -->
|
||||||
|
|
||||||
<nav role="navigation" id="image-navigation" class="navigation-image">
|
<nav role="navigation" id="image-navigation" class="navigation-image">
|
||||||
<div class="previous"><?php previous_image_link( false, __( '<span class="meta-nav">←</span> Previous', '_s' ) ); ?></div>
|
<div class="nav-previous"><?php previous_image_link( false, __( '<span class="meta-nav">←</span> Previous', '_s' ) ); ?></div>
|
||||||
<div class="next"><?php next_image_link( false, __( 'Next <span class="meta-nav">→</span>', '_s' ) ); ?></div>
|
<div class="nav-next"><?php next_image_link( false, __( 'Next <span class="meta-nav">→</span>', '_s' ) ); ?></div>
|
||||||
</nav><!-- #image-navigation -->
|
</nav><!-- #image-navigation -->
|
||||||
</header><!-- .entry-header -->
|
</header><!-- .entry-header -->
|
||||||
|
|
||||||
|
|
|
@ -35,17 +35,17 @@ function _s_content_nav( $nav_id ) {
|
||||||
|
|
||||||
<?php if ( is_single() ) : // navigation links for single posts ?>
|
<?php if ( is_single() ) : // navigation links for single posts ?>
|
||||||
|
|
||||||
<?php previous_post_link( '<div class="previous">%link</div>', '<span class="meta-nav">' . _x( '←', 'Previous post link', '_s' ) . '</span> %title' ); ?>
|
<?php previous_post_link( '<div class="nav-previous">%link</div>', '<span class="meta-nav">' . _x( '←', 'Previous post link', '_s' ) . '</span> %title' ); ?>
|
||||||
<?php next_post_link( '<div class="next">%link</div>', '%title <span class="meta-nav">' . _x( '→', 'Next post link', '_s' ) . '</span>' ); ?>
|
<?php next_post_link( '<div class="nav-next">%link</div>', '%title <span class="meta-nav">' . _x( '→', 'Next post link', '_s' ) . '</span>' ); ?>
|
||||||
|
|
||||||
<?php elseif ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?>
|
<?php elseif ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?>
|
||||||
|
|
||||||
<?php if ( get_next_posts_link() ) : ?>
|
<?php if ( get_next_posts_link() ) : ?>
|
||||||
<div class="previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', '_s' ) ); ?></div>
|
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', '_s' ) ); ?></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ( get_previous_posts_link() ) : ?>
|
<?php if ( get_previous_posts_link() ) : ?>
|
||||||
<div class="next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', '_s' ) ); ?></div>
|
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', '_s' ) ); ?></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
Reference in New Issue