forked from mirror/_s
Merge branch 'pr/667'
This commit is contained in:
commit
6b2e7c8b44
|
@ -34,7 +34,7 @@ get_header(); ?>
|
|||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php _s_paging_nav(); ?>
|
||||
<?php the_posts_navigation(); ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
|
|
|
@ -7,26 +7,28 @@
|
|||
* @package _s
|
||||
*/
|
||||
|
||||
if ( ! function_exists( '_s_paging_nav' ) ) :
|
||||
if ( ! function_exists( 'the_posts_navigation' ) ) :
|
||||
/**
|
||||
* Display navigation to next/previous set of posts when applicable.
|
||||
*
|
||||
* @todo Remove this function when WordPress 4.3 is released.
|
||||
*/
|
||||
function _s_paging_nav() {
|
||||
function the_posts_navigation() {
|
||||
// Don't print empty markup if there's only one page.
|
||||
if ( $GLOBALS['wp_query']->max_num_pages < 2 ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<nav class="navigation paging-navigation" role="navigation">
|
||||
<h1 class="screen-reader-text"><?php _e( 'Posts navigation', '_s' ); ?></h1>
|
||||
<nav class="navigation posts-navigation" role="navigation">
|
||||
<h2 class="screen-reader-text"><?php _e( 'Posts navigation', '_s' ); ?></h2>
|
||||
<div class="nav-links">
|
||||
|
||||
<?php if ( get_next_posts_link() ) : ?>
|
||||
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', '_s' ) ); ?></div>
|
||||
<div class="nav-previous"><?php next_posts_link( __( 'Older posts', '_s' ) ); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( get_previous_posts_link() ) : ?>
|
||||
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', '_s' ) ); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts', '_s' ) ); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- .nav-links -->
|
||||
|
@ -35,11 +37,13 @@ function _s_paging_nav() {
|
|||
}
|
||||
endif;
|
||||
|
||||
if ( ! function_exists( '_s_post_nav' ) ) :
|
||||
if ( ! function_exists( 'the_post_navigation' ) ) :
|
||||
/**
|
||||
* Display navigation to next/previous post when applicable.
|
||||
*
|
||||
* @todo Remove this function when WordPress 4.3 is released.
|
||||
*/
|
||||
function _s_post_nav() {
|
||||
function the_post_navigation() {
|
||||
// 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 );
|
||||
|
@ -49,11 +53,11 @@ function _s_post_nav() {
|
|||
}
|
||||
?>
|
||||
<nav class="navigation post-navigation" role="navigation">
|
||||
<h1 class="screen-reader-text"><?php _e( 'Post navigation', '_s' ); ?></h1>
|
||||
<h2 class="screen-reader-text"><?php _e( 'Post navigation', '_s' ); ?></h2>
|
||||
<div class="nav-links">
|
||||
<?php
|
||||
previous_post_link( '<div class="nav-previous">%link</div>', _x( '<span class="meta-nav">←</span> %title', 'Previous post link', '_s' ) );
|
||||
next_post_link( '<div class="nav-next">%link</div>', _x( '%title <span class="meta-nav">→</span>', 'Next post link', '_s' ) );
|
||||
previous_post_link( '<div class="nav-previous">%link</div>', '%title' );
|
||||
next_post_link( '<div class="nav-next">%link</div>', '%title' );
|
||||
?>
|
||||
</div><!-- .nav-links -->
|
||||
</nav><!-- .navigation -->
|
||||
|
|
|
@ -31,7 +31,7 @@ get_header(); ?>
|
|||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php _s_paging_nav(); ?>
|
||||
<?php the_posts_navigation(); ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
# Copyright (C) 2014 Automattic
|
||||
# Copyright (C) 2015 Automattic
|
||||
# This file is distributed under the GNU General Public License v2 or later.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: _s 1.0-wpcom\n"
|
||||
"Report-Msgid-Bugs-To: http://wordpress.org/support/theme/_s\n"
|
||||
"POT-Creation-Date: 2014-12-03 09:43:15+00:00\n"
|
||||
"Project-Id-Version: _s 1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: http://wordpress.org/tags/_s\n"
|
||||
"POT-Creation-Date: 2015-01-06 02:24:02+00:00\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
|
||||
"PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
||||
|
@ -73,7 +73,7 @@ msgstr ""
|
|||
msgid "Pages:"
|
||||
msgstr ""
|
||||
|
||||
#: content-page.php:25 inc/template-tags.php:122
|
||||
#: content-page.php:25 inc/template-tags.php:126
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
||||
|
@ -111,163 +111,152 @@ msgstr ""
|
|||
msgid "Page %s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:21
|
||||
#: inc/template-tags.php:23
|
||||
msgid "Posts navigation"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:25
|
||||
msgid "<span class=\"meta-nav\">←</span> Older posts"
|
||||
#: inc/template-tags.php:27
|
||||
msgid "Older posts"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:29
|
||||
msgid "Newer posts <span class=\"meta-nav\">→</span>"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:52
|
||||
msgid "Post navigation"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:55
|
||||
msgctxt "Previous post link"
|
||||
msgid "<span class=\"meta-nav\">←</span> %title"
|
||||
#: inc/template-tags.php:31
|
||||
msgid "Newer posts"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:56
|
||||
msgctxt "Next post link"
|
||||
msgid "%title <span class=\"meta-nav\">→</span>"
|
||||
msgid "Post navigation"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:82
|
||||
#: inc/template-tags.php:86
|
||||
msgctxt "post date"
|
||||
msgid "Posted on %s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:87
|
||||
#: inc/template-tags.php:91
|
||||
msgctxt "post author"
|
||||
msgid "by %s"
|
||||
msgstr ""
|
||||
|
||||
#. translators: used between list items, there is a space after the comma
|
||||
|
||||
#: inc/template-tags.php:104 inc/template-tags.php:110
|
||||
#: inc/template-tags.php:108 inc/template-tags.php:114
|
||||
msgid ", "
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:106
|
||||
#: inc/template-tags.php:110
|
||||
msgid "Posted in %1$s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:112
|
||||
#: inc/template-tags.php:116
|
||||
msgid "Tagged %1$s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:118
|
||||
#: inc/template-tags.php:122
|
||||
msgid "Leave a comment"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:118
|
||||
#: inc/template-tags.php:122
|
||||
msgid "1 Comment"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:118
|
||||
#: inc/template-tags.php:122
|
||||
msgid "% Comments"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:139
|
||||
#: inc/template-tags.php:143
|
||||
msgid "Category: %s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:141
|
||||
#: inc/template-tags.php:145
|
||||
msgid "Tag: %s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:143
|
||||
#: inc/template-tags.php:147
|
||||
msgid "Author: %s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:145
|
||||
#: inc/template-tags.php:149
|
||||
msgid "Year: %s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:145
|
||||
#: inc/template-tags.php:149
|
||||
msgctxt "yearly archives date format"
|
||||
msgid "Y"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:147
|
||||
#: inc/template-tags.php:151
|
||||
msgid "Month: %s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:147
|
||||
#: inc/template-tags.php:151
|
||||
msgctxt "monthly archives date format"
|
||||
msgid "F Y"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:149
|
||||
#: inc/template-tags.php:153
|
||||
msgid "Day: %s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:149
|
||||
#: inc/template-tags.php:153
|
||||
msgctxt "daily archives date format"
|
||||
msgid "F j, Y"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:151
|
||||
#: inc/template-tags.php:155
|
||||
msgctxt "post format archive title"
|
||||
msgid "Asides"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:153
|
||||
#: inc/template-tags.php:157
|
||||
msgctxt "post format archive title"
|
||||
msgid "Galleries"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:155
|
||||
#: inc/template-tags.php:159
|
||||
msgctxt "post format archive title"
|
||||
msgid "Images"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:157
|
||||
#: inc/template-tags.php:161
|
||||
msgctxt "post format archive title"
|
||||
msgid "Videos"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:159
|
||||
#: inc/template-tags.php:163
|
||||
msgctxt "post format archive title"
|
||||
msgid "Quotes"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:161
|
||||
#: inc/template-tags.php:165
|
||||
msgctxt "post format archive title"
|
||||
msgid "Links"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:163
|
||||
#: inc/template-tags.php:167
|
||||
msgctxt "post format archive title"
|
||||
msgid "Statuses"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:165
|
||||
#: inc/template-tags.php:169
|
||||
msgctxt "post format archive title"
|
||||
msgid "Audio"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:167
|
||||
#: inc/template-tags.php:171
|
||||
msgctxt "post format archive title"
|
||||
msgid "Chats"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:169
|
||||
#: inc/template-tags.php:173
|
||||
msgid "Archives: %s"
|
||||
msgstr ""
|
||||
|
||||
#. translators: 1: Taxonomy singular name, 2: Current taxonomy term
|
||||
|
||||
#: inc/template-tags.php:173
|
||||
#: inc/template-tags.php:177
|
||||
msgid "%1$s: %2$s"
|
||||
msgstr ""
|
||||
|
||||
#: inc/template-tags.php:175
|
||||
#: inc/template-tags.php:179
|
||||
msgid "Archives"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Globally hidden elements when Infinite Scroll is supported and in use. */
|
||||
.infinite-scroll .paging-navigation, /* Older / Newer Posts Navigation (always hidden) */
|
||||
.infinite-scroll .posts-navigation, /* Older / Newer Posts Navigation (always hidden) */
|
||||
.infinite-scroll.neverending .site-footer { /* Theme Footer (when set to scrolling) */
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -78,21 +78,21 @@
|
|||
}
|
||||
|
||||
.site-main .comment-navigation,
|
||||
.site-main .paging-navigation,
|
||||
.site-main .posts-navigation,
|
||||
.site-main .post-navigation {
|
||||
margin: 0 0 1.5em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.comment-navigation .nav-previous,
|
||||
.paging-navigation .nav-previous,
|
||||
.posts-navigation .nav-previous,
|
||||
.post-navigation .nav-previous {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.comment-navigation .nav-next,
|
||||
.paging-navigation .nav-next,
|
||||
.posts-navigation .nav-next,
|
||||
.post-navigation .nav-next {
|
||||
float: right;
|
||||
text-align: right;
|
||||
|
|
|
@ -30,7 +30,7 @@ get_header(); ?>
|
|||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php _s_paging_nav(); ?>
|
||||
<?php the_posts_navigation(); ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ get_header(); ?>
|
|||
|
||||
<?php get_template_part( 'content', 'single' ); ?>
|
||||
|
||||
<?php _s_post_nav(); ?>
|
||||
<?php the_post_navigation(); ?>
|
||||
|
||||
<?php
|
||||
// If comments are open or we have at least one comment, load up the comment template
|
||||
|
|
|
@ -506,21 +506,21 @@ a:active {
|
|||
}
|
||||
|
||||
.site-main .comment-navigation,
|
||||
.site-main .paging-navigation,
|
||||
.site-main .posts-navigation,
|
||||
.site-main .post-navigation {
|
||||
margin: 0 0 1.5em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.comment-navigation .nav-previous,
|
||||
.paging-navigation .nav-previous,
|
||||
.posts-navigation .nav-previous,
|
||||
.post-navigation .nav-previous {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.comment-navigation .nav-next,
|
||||
.paging-navigation .nav-next,
|
||||
.posts-navigation .nav-next,
|
||||
.post-navigation .nav-next {
|
||||
float: right;
|
||||
text-align: right;
|
||||
|
@ -685,7 +685,7 @@ a:active {
|
|||
11.0 Infinite scroll
|
||||
--------------------------------------------------------------*/
|
||||
/* Globally hidden elements when Infinite Scroll is supported and in use. */
|
||||
.infinite-scroll .paging-navigation, /* Older / Newer Posts Navigation (always hidden) */
|
||||
.infinite-scroll .posts-navigation, /* Older / Newer Posts Navigation (always hidden) */
|
||||
.infinite-scroll.neverending .site-footer { /* Theme Footer (when set to scrolling) */
|
||||
display: none;
|
||||
}
|
||||
|
|
Reference in New Issue