From 67fb1af3f3118b8241e094e11c01afa437dca0ef Mon Sep 17 00:00:00 2001 From: Julien Melissas Date: Wed, 24 Dec 2014 00:19:34 -0500 Subject: [PATCH 01/13] Add braces around if statement. Running jshint on this file returned an error, adding braces fixed it. Please add braces around if statements!!! :) --- js/skip-link-focus-fix.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/skip-link-focus-fix.js b/js/skip-link-focus-fix.js index 044d055..1581349 100644 --- a/js/skip-link-focus-fix.js +++ b/js/skip-link-focus-fix.js @@ -8,8 +8,9 @@ var element = document.getElementById( location.hash.substring( 1 ) ); if ( element ) { - if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) + if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) { element.tabIndex = -1; + } element.focus(); } From c4f6755f61db38949d55ef7706adbc108f6acc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A4nk=20Klein?= Date: Tue, 30 Dec 2014 14:53:42 +0100 Subject: [PATCH 02/13] Remove home link from wp_page_menu() args. --- inc/extras.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/inc/extras.php b/inc/extras.php index 02bdeea..2adab69 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -7,18 +7,6 @@ * @package _s */ -/** - * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. - * - * @param array $args Configuration arguments. - * @return array - */ -function _s_page_menu_args( $args ) { - $args['show_home'] = true; - return $args; -} -add_filter( 'wp_page_menu_args', '_s_page_menu_args' ); - /** * Adds custom classes to the array of body classes. * From de7a9b576b74d9b8285e7b0e4f359c06c3964822 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Tue, 30 Dec 2014 20:05:47 -0800 Subject: [PATCH 03/13] _s: Remove leading white space for theme name. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At some point in the past it was believed that a leading whitespace was necessary for a proper replacement. Let’s see if the existing replace handler can indeed handle it without it. See https://github.com/Automattic/underscores.me/commit/7671cad5685ae8df50a0 2f871a1ae28119b8dbf1 --- style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/style.css b/style.css index 1a06687..b4f8127 100644 --- a/style.css +++ b/style.css @@ -13,7 +13,7 @@ Tags: This theme, like WordPress, is licensed under the GPL. Use it to make something cool, have fun, and share what you've learned with others. - _s is based on Underscores http://underscores.me/, (C) 2012-2014 Automattic, Inc. +_s is based on Underscores http://underscores.me/, (C) 2012-2014 Automattic, Inc. Resetting and rebuilding styles have been helped along thanks to the fine work of Eric Meyer http://meyerweb.com/eric/tools/css/reset/index.html From 9711e6d542ff2fbf73739a171bd3fa43780f42a7 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Tue, 30 Dec 2014 20:07:35 -0800 Subject: [PATCH 04/13] _s: Remove leading white space in style.scss. See de7a9b576b74d9b8285e7b0e4f359c06c3964822. --- sass/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sass/style.scss b/sass/style.scss index f5ce83d..8ca2e6e 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -13,7 +13,7 @@ Tags: This theme, like WordPress, is licensed under the GPL. Use it to make something cool, have fun, and share what you've learned with others. - _s is based on Underscores http://underscores.me/, (C) 2012-2014 Automattic, Inc. +_s is based on Underscores http://underscores.me/, (C) 2012-2014 Automattic, Inc. Resetting and rebuilding styles have been helped along thanks to the fine work of Eric Meyer http://meyerweb.com/eric/tools/css/reset/index.html From 01819a8a0a65c06fb7b231aab075f823b0d9d021 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Tue, 30 Dec 2014 20:08:44 -0800 Subject: [PATCH 05/13] _s: Update copyright year in anticipation of 2015. --- sass/style.scss | 2 +- style.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sass/style.scss b/sass/style.scss index 8ca2e6e..9af489c 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -13,7 +13,7 @@ Tags: This theme, like WordPress, is licensed under the GPL. Use it to make something cool, have fun, and share what you've learned with others. -_s is based on Underscores http://underscores.me/, (C) 2012-2014 Automattic, Inc. +_s is based on Underscores http://underscores.me/, (C) 2012-2015 Automattic, Inc. Resetting and rebuilding styles have been helped along thanks to the fine work of Eric Meyer http://meyerweb.com/eric/tools/css/reset/index.html diff --git a/style.css b/style.css index b4f8127..ba5b5d0 100644 --- a/style.css +++ b/style.css @@ -13,7 +13,7 @@ Tags: This theme, like WordPress, is licensed under the GPL. Use it to make something cool, have fun, and share what you've learned with others. -_s is based on Underscores http://underscores.me/, (C) 2012-2014 Automattic, Inc. +_s is based on Underscores http://underscores.me/, (C) 2012-2015 Automattic, Inc. Resetting and rebuilding styles have been helped along thanks to the fine work of Eric Meyer http://meyerweb.com/eric/tools/css/reset/index.html From 2580a0a69f091b98272bc74e35c347b34a20a52d Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Tue, 30 Dec 2014 20:19:28 -0800 Subject: [PATCH 06/13] _s: Remove author data shim. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Immediate set up of author data in author archives was added in WordPress 3.7, so it’s safe to remove. See https://core.trac.wordpress.org/ticket/14408. See a156f2cbaba0077e73a424ea4e84590e670a5221. --- inc/extras.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/inc/extras.php b/inc/extras.php index 02bdeea..2e25448 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -81,24 +81,3 @@ if ( version_compare( $GLOBALS['wp_version'], '4.1', '<' ) ) : } add_action( 'wp_head', '_s_render_title' ); endif; - -/** - * Sets the authordata global when viewing an author archive. - * - * This provides backwards compatibility with - * http://core.trac.wordpress.org/changeset/25574 - * - * It removes the need to call the_post() and rewind_posts() in an author - * template to print information about the author. - * - * @global WP_Query $wp_query WordPress Query object. - * @return void - */ -function _s_setup_author() { - global $wp_query; - - if ( $wp_query->is_author() && isset( $wp_query->post ) ) { - $GLOBALS['authordata'] = get_userdata( $wp_query->post->post_author ); - } -} -add_action( 'wp', '_s_setup_author' ); From 75c5023576c3ba474a7ecb3f980491905ced9222 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Tue, 30 Dec 2014 20:34:46 -0800 Subject: [PATCH 07/13] _s: Use semantic versioning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fairly minor and noncommittal change. It does encourage theme authors to think about semantically versioning their themes but doesn’t require `_s` to take a strong stand on it. It also removes an obstacle from submitting the generated theme to the WordPress.org Theme Directory, as it refuses themes with non-numeric version numbers. Fixes https://github.com/Automattic/underscores.me/issues/8 Closes https://github.com/Automattic/underscores.me/pull/20 Props @ScottSmith95. --- sass/style.scss | 2 +- style.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sass/style.scss b/sass/style.scss index 9af489c..789dcf4 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -4,7 +4,7 @@ Theme URI: http://underscores.me/ Author: Automattic Author URI: http://automattic.com/ Description: Hi. I'm a starter theme called _s, or underscores, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for. -Version: 1.0-wpcom +Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: _s diff --git a/style.css b/style.css index ba5b5d0..b6701b6 100644 --- a/style.css +++ b/style.css @@ -4,7 +4,7 @@ Theme URI: http://underscores.me/ Author: Automattic Author URI: http://automattic.com/ Description: Hi. I'm a starter theme called _s, or underscores, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for. -Version: 1.0-wpcom +Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: _s From e5e31d472cd038e028692e6794e749e0efef917c Mon Sep 17 00:00:00 2001 From: Philip Arthur Moore Date: Tue, 6 Jan 2015 10:45:45 +0700 Subject: [PATCH 08/13] Update WP versions that are being used in Travis checks. [skip ci] --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6933ef0..fb80881 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 From 5c6311499bf2b72edf052125aa311e83393ad06a Mon Sep 17 00:00:00 2001 From: Philip Arthur Moore Date: Tue, 6 Jan 2015 11:48:47 +0700 Subject: [PATCH 09/13] Update Travis CI build checks. Props @miya0001. See #663. --- codesniffer.ruleset.xml | 3 +++ inc/template-tags.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/codesniffer.ruleset.xml b/codesniffer.ruleset.xml index 3f7872a..d2b1ce7 100644 --- a/codesniffer.ruleset.xml +++ b/codesniffer.ruleset.xml @@ -1,6 +1,7 @@ + A custom set of code standard rules to check for Underscores. @@ -8,6 +9,8 @@ + + diff --git a/inc/template-tags.php b/inc/template-tags.php index 5dd3759..ebeaca6 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -53,7 +53,7 @@ function _s_post_nav() { ', _x( ' %title', 'Previous post link', '_s' ) ); - next_post_link( '', _x( '%title ', 'Next post link', '_s' ) ); + next_post_link( '', _x( '%title ', 'Next post link', '_s' ) ); ?> From 894bd6b5d3957730b22c7055db4228b643ca1afa Mon Sep 17 00:00:00 2001 From: Kazue Igarashi Date: Fri, 19 Dec 2014 10:34:18 +0900 Subject: [PATCH 10/13] Use core navigation template tags. * Remove custom arguments from `the_posts_navigation()` and `the_post_navigation()`. * Adjust fallbacks for `the_posts_navigation()` and `the_post_navigation()`. * update pot file. * merge master for style.css and style.scss. --- archive.php | 2 +- inc/template-tags.php | 26 +++++---- index.php | 2 +- languages/_s.pot | 93 +++++++++++++----------------- sass/modules/_infinite-scroll.scss | 2 +- sass/navigation/_menus.scss | 6 +- search.php | 2 +- single.php | 2 +- style.css | 8 +-- 9 files changed, 68 insertions(+), 75 deletions(-) diff --git a/archive.php b/archive.php index 3d0efcc..b0a1971 100644 --- a/archive.php +++ b/archive.php @@ -34,7 +34,7 @@ get_header(); ?> - + diff --git a/inc/template-tags.php b/inc/template-tags.php index ebeaca6..2dd9175 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -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; } ?> -