Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into ja
Browse files Browse the repository at this point in the history
* upstream/master:
  Revert "Merge branch 'pr/667'"
  Merge branch 'pr/667'
  Use core navigation template tags.
  Update Travis CI build checks. Props @miya0001. See Automattic#663.
  Update WP versions that are being used in Travis checks. [skip ci]

Conflicts:
	languages/_s.pot
  • Loading branch information
gatespace committed Jan 7, 2015
2 parents 3cc1f78 + 6b2e7c8 commit 11103d5
Show file tree
Hide file tree
Showing 11 changed files with 111 additions and 61 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ env:
# @link https://github.com/WordPress/WordPress
- WP_VERSION=master WP_MULTISITE=0
- WP_VERSION=master WP_MULTISITE=1
# WordPress 4.1
# @link https://github.com/WordPress/WordPress/tree/4.1-branch
- WP_VERSION=4.1 WP_MULTISITE=0
- WP_VERSION=4.1 WP_MULTISITE=1
# WordPress 4.0
# @link https://github.com/WordPress/WordPress/tree/4.0-branch
- WP_VERSION=4.0 WP_MULTISITE=0
- WP_VERSION=4.0 WP_MULTISITE=1
# WordPress 3.9
# @link https://github.com/WordPress/WordPress/tree/3.9-branch
- WP_VERSION=3.9 WP_MULTISITE=0
- WP_VERSION=3.9 WP_MULTISITE=1

# Declare 5.6 beta in test matrix.
# @link https://buddypress.trac.wordpress.org/ticket/5620
Expand Down
2 changes: 1 addition & 1 deletion archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<?php endwhile; ?>

<?php _s_paging_nav(); ?>
<?php the_posts_navigation(); ?>

<?php else : ?>

Expand Down
3 changes: 3 additions & 0 deletions codesniffer.ruleset.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?xml version="1.0"?>
<ruleset name="Underscores WordPress Theme Coding Standards Configuration">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->

<!-- Set a description for this ruleset. -->
<description>A custom set of code standard rules to check for Underscores.</description>

<!-- Include the WordPress ruleset, with exclusions. -->
<rule ref="WordPress">
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />

<exclude name="WordPress.XSS.EscapeOutput" />
<exclude name="WordPress.WhiteSpace.ScopeIndent.Incorrect" />
Expand Down
26 changes: 15 additions & 11 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -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">&larr;</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">&rarr;</span>', '_s' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts', '_s' ) ); ?></div>
<?php endif; ?>

</div><!-- .nav-links -->
Expand All @@ -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 );
Expand All @@ -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">&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' ) );
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 -->
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<?php endwhile; ?>

<?php _s_paging_nav(); ?>
<?php the_posts_navigation(); ?>

<?php else : ?>

Expand Down
111 changes: 77 additions & 34 deletions languages/_s.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: _s 1.0.0\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tags/_s\n"
"POT-Creation-Date: 2015-01-05 05:45:02+00:00\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"
Expand Down Expand Up @@ -79,7 +79,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 ""

Expand Down Expand Up @@ -116,161 +116,204 @@ 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\">&larr;</span> Older posts"
#: inc/template-tags.php:27
msgid "Older posts"
msgstr ""

#: inc/template-tags.php:29
msgid "Newer posts <span class=\"meta-nav\">&rarr;</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\">&larr;</span>&nbsp;%title"
#: inc/template-tags.php:31
msgid "Newer posts"
msgstr ""

#: inc/template-tags.php:56
msgctxt "Next post link"
msgid "%title&nbsp;<span class=\"meta-nav\">&rarr;</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
<<<<<<< HEAD
#: inc/template-tags.php:104 inc/template-tags.php:110
=======
#: inc/template-tags.php:108 inc/template-tags.php:114
>>>>>>> upstream/master
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 ""

<<<<<<< HEAD
#: inc/template-tags.php:152
=======
#: inc/template-tags.php:155
>>>>>>> upstream/master
msgctxt "post format archive title"
msgid "Asides"
msgstr ""

<<<<<<< HEAD
#: inc/template-tags.php:154
=======
#: inc/template-tags.php:157
>>>>>>> upstream/master
msgctxt "post format archive title"
msgid "Galleries"
msgstr ""

<<<<<<< HEAD
#: inc/template-tags.php:156
=======
#: inc/template-tags.php:159
>>>>>>> upstream/master
msgctxt "post format archive title"
msgid "Images"
msgstr ""

<<<<<<< HEAD
#: inc/template-tags.php:158
=======
#: inc/template-tags.php:161
>>>>>>> upstream/master
msgctxt "post format archive title"
msgid "Videos"
msgstr ""

<<<<<<< HEAD
#: inc/template-tags.php:160
=======
#: inc/template-tags.php:163
>>>>>>> upstream/master
msgctxt "post format archive title"
msgid "Quotes"
msgstr ""

<<<<<<< HEAD
#: inc/template-tags.php:162
=======
#: inc/template-tags.php:165
>>>>>>> upstream/master
msgctxt "post format archive title"
msgid "Links"
msgstr ""

<<<<<<< HEAD
#: inc/template-tags.php:164
=======
#: inc/template-tags.php:167
>>>>>>> upstream/master
msgctxt "post format archive title"
msgid "Statuses"
msgstr ""

<<<<<<< HEAD
#: inc/template-tags.php:166
=======
#: inc/template-tags.php:169
>>>>>>> upstream/master
msgctxt "post format archive title"
msgid "Audio"
msgstr ""

<<<<<<< HEAD
#: inc/template-tags.php:168
=======
#: inc/template-tags.php:171
>>>>>>> upstream/master
msgctxt "post format archive title"
msgid "Chats"
msgstr ""

<<<<<<< HEAD
#: inc/template-tags.php:171
=======
#: inc/template-tags.php:173
>>>>>>> upstream/master
msgid "Archives: %s"
msgstr ""

#. translators: 1: Taxonomy singular name, 2: Current taxonomy term
<<<<<<< HEAD
#: inc/template-tags.php:175
msgid "%1$s: %2$s"
msgstr ""

#: inc/template-tags.php:177
=======

#: inc/template-tags.php:177
msgid "%1$s: %2$s"
msgstr ""

#: inc/template-tags.php:179
>>>>>>> upstream/master
msgid "Archives"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion sass/modules/_infinite-scroll.scss
Original file line number Diff line number Diff line change
@@ -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;
}
Expand Down
Loading

0 comments on commit 11103d5

Please sign in to comment.