From 08befd97636b0bc9f83086b0650dd6e872333204 Mon Sep 17 00:00:00 2001 From: desrosj Date: Sat, 15 Dec 2018 11:09:56 +0000 Subject: [PATCH] Twenty Nineteen: Fixes and improvements. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit brings over several changes that occurred upstream in the theme’s GitHub repository into core. - Fix the gallery caption link color. https://github.com/WordPress/twentynineteen/pull/687 - Remove left padding from pullquote blocks. https://github.com/WordPress/twentynineteen/pull/690 - Print `skip-link-focus-fix` inline instead of enqueueing as blocking script. https://github.com/WordPress/twentynineteen/pull/47 - Fix and improve some strings with placeholders. https://github.com/WordPress/twentynineteen/pull/217 Props kjellr, allancole, dimadin, westonruter. See #45424. Built from https://develop.svn.wordpress.org/branches/5.0@44196 git-svn-id: http://core.svn.wordpress.org/branches/5.0@44026 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../class-twentynineteen-walker-comment.php | 2 -- .../themes/twentynineteen/functions.php | 20 +++++++++++++++++-- .../twentynineteen/inc/template-tags.php | 6 +++--- .../twentynineteen/js/skip-link-focus-fix.js | 2 ++ .../twentynineteen/sass/blocks/_blocks.scss | 5 +++++ wp-content/themes/twentynineteen/single.php | 3 ++- .../themes/twentynineteen/style-rtl.css | 5 +++++ wp-content/themes/twentynineteen/style.css | 5 +++++ .../template-parts/post/author-bio.php | 1 + wp-includes/version.php | 2 +- 10 files changed, 42 insertions(+), 9 deletions(-) diff --git a/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php b/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php index b39185e45e..a6e0c345d1 100644 --- a/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php +++ b/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php @@ -51,7 +51,6 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment { * fill color to the inner check shape when in circle form. */ if ( twentynineteen_is_comment_by_post_author( $comment ) ) { - /* translators: %s: SVG Icon */ printf( '', twentynineteen_get_icon_svg( 'check', 24 ) ); } @@ -110,5 +109,4 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment { ?> + + %1$s%2$s%4$s', /* translators: 1: SVG icon. 2: post author, only visible to screen readers. 3: author link. */ + '%1$s%2$s%4$s', twentynineteen_get_icon_svg( 'person', 16 ), __( 'Posted by', 'twentynineteen' ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), @@ -85,8 +85,8 @@ if ( ! function_exists( 'twentynineteen_entry_footer' ) ) : /* translators: used between list items, there is a space after the comma. */ $categories_list = get_the_category_list( __( ', ', 'twentynineteen' ) ); if ( $categories_list ) { - /* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of categories. */ printf( + /* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of categories. */ '%1$s%2$s%3$s', twentynineteen_get_icon_svg( 'archive', 16 ), __( 'Posted in', 'twentynineteen' ), @@ -97,8 +97,8 @@ if ( ! function_exists( 'twentynineteen_entry_footer' ) ) : /* translators: used between list items, there is a space after the comma. */ $tags_list = get_the_tag_list( '', __( ', ', 'twentynineteen' ) ); if ( $tags_list ) { - /* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of tags. */ printf( + /* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of tags. */ '%1$s%2$s %3$s', twentynineteen_get_icon_svg( 'tag', 16 ), __( 'Tags:', 'twentynineteen' ), diff --git a/wp-content/themes/twentynineteen/js/skip-link-focus-fix.js b/wp-content/themes/twentynineteen/js/skip-link-focus-fix.js index 0037752e09..32ba80cc3c 100644 --- a/wp-content/themes/twentynineteen/js/skip-link-focus-fix.js +++ b/wp-content/themes/twentynineteen/js/skip-link-focus-fix.js @@ -3,6 +3,8 @@ * * Helps with accessibility for keyboard only users. * + * This is the source file for what is minified in the twentynineteen_skip_link_focus_fix() PHP function. + * * Learn more: https://git.io/vWdr2 */ ( function() { diff --git a/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss b/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss index 7bb4963351..28572e0823 100644 --- a/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss +++ b/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss @@ -324,6 +324,7 @@ margin-top: calc(4 * #{ $size__spacing-unit}); margin-bottom: calc(4.33 * #{ $size__spacing-unit}); margin-right: 0; + padding-left: 0; } p { @@ -578,6 +579,10 @@ .blocks-gallery-item:last-child { margin-bottom: 16px; } + + figcaption a { + color: #fff; + } } //! Captions diff --git a/wp-content/themes/twentynineteen/single.php b/wp-content/themes/twentynineteen/single.php index 2e367523be..02f178c28f 100644 --- a/wp-content/themes/twentynineteen/single.php +++ b/wp-content/themes/twentynineteen/single.php @@ -27,7 +27,8 @@ get_header(); // Parent post navigation. the_post_navigation( array( - 'prev_text' => _x( 'Published in
%title', 'Parent post link', 'twentynineteen' ), + /* translators: %s: parent post link */ + 'prev_text' => sprintf( __( 'Published in%s', 'twentynineteen' ), '%title' ), ) ); } elseif ( is_singular( 'post' ) ) { diff --git a/wp-content/themes/twentynineteen/style-rtl.css b/wp-content/themes/twentynineteen/style-rtl.css index bb5e4592b5..d0fc3e6627 100644 --- a/wp-content/themes/twentynineteen/style-rtl.css +++ b/wp-content/themes/twentynineteen/style-rtl.css @@ -3765,6 +3765,7 @@ body.page .main-navigation { margin-top: calc(4 * 1rem); margin-bottom: calc(4.33 * 1rem); margin-left: 0; + padding-right: 0; } .entry .entry-content .wp-block-pullquote p { @@ -4047,6 +4048,10 @@ body.page .main-navigation { margin-bottom: 16px; } +.entry .entry-content .wp-block-gallery figcaption a { + color: #fff; +} + .entry .entry-content .wp-block-audio figcaption, .entry .entry-content .wp-block-video figcaption, .entry .entry-content .wp-block-image figcaption, diff --git a/wp-content/themes/twentynineteen/style.css b/wp-content/themes/twentynineteen/style.css index 20d5d725a8..45b3e54366 100644 --- a/wp-content/themes/twentynineteen/style.css +++ b/wp-content/themes/twentynineteen/style.css @@ -3777,6 +3777,7 @@ body.page .main-navigation { margin-top: calc(4 * 1rem); margin-bottom: calc(4.33 * 1rem); margin-right: 0; + padding-left: 0; } .entry .entry-content .wp-block-pullquote p { @@ -4059,6 +4060,10 @@ body.page .main-navigation { margin-bottom: 16px; } +.entry .entry-content .wp-block-gallery figcaption a { + color: #fff; +} + .entry .entry-content .wp-block-audio figcaption, .entry .entry-content .wp-block-video figcaption, .entry .entry-content .wp-block-image figcaption, diff --git a/wp-content/themes/twentynineteen/template-parts/post/author-bio.php b/wp-content/themes/twentynineteen/template-parts/post/author-bio.php index 4f62904e88..d1ba8c3f76 100644 --- a/wp-content/themes/twentynineteen/template-parts/post/author-bio.php +++ b/wp-content/themes/twentynineteen/template-parts/post/author-bio.php @@ -10,6 +10,7 @@ if ( (bool) get_the_author_meta( 'description' ) ) : ?>

+

diff --git a/wp-includes/version.php b/wp-includes/version.php index 8ae0d66f05..05309bc7e9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0.2-alpha-44195'; +$wp_version = '5.0.2-alpha-44196'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.