From a785107bf4d6dbbe1d803da86dc8e3a655051541 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 17 Apr 2017 10:24:38 +0000 Subject: [PATCH] Twenty Seventeen: Correct heading hierarchy for posts on the front page. When the posts page is on the front page or within a front page section, the heading hierarchy for the individual post titles needs to be adjusted accordingly. Props joedolson, celloexpressions, davidakennedy. Fixes #40264. Merges [40458] to the 4.7 branch. Built from https://develop.svn.wordpress.org/branches/4.7@40459 git-svn-id: http://core.svn.wordpress.org/branches/4.7@40335 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyseventeen/style.css | 4 +++- .../twentyseventeen/template-parts/post/content-audio.php | 2 ++ .../template-parts/post/content-excerpt.php | 8 +++++++- .../template-parts/post/content-gallery.php | 2 ++ .../twentyseventeen/template-parts/post/content-image.php | 2 ++ .../twentyseventeen/template-parts/post/content-video.php | 2 ++ .../twentyseventeen/template-parts/post/content.php | 2 ++ wp-includes/version.php | 2 +- 8 files changed, 21 insertions(+), 3 deletions(-) diff --git a/wp-content/themes/twentyseventeen/style.css b/wp-content/themes/twentyseventeen/style.css index dcfedd1d28..bfbfacb491 100644 --- a/wp-content/themes/twentyseventeen/style.css +++ b/wp-content/themes/twentyseventeen/style.css @@ -451,7 +451,8 @@ h1 { font-weight: 300; } -h2 { +h2, +.home.blog .entry-title { color: #666; font-size: 20px; font-size: 1.25rem; @@ -3145,6 +3146,7 @@ object { } h2, + .home.blog .entry-title, .page .panel-content .recent-posts .entry-title { font-size: 26px; font-size: 1.625rem; diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php b/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php index 19c79acb2a..476379eb61 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php @@ -33,6 +33,8 @@ if ( is_single() ) { the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); } else { the_title( '

', '

' ); } diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php b/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php index 0b342d25b6..f506599f2f 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content-excerpt.php @@ -30,7 +30,13 @@ - ', esc_url( get_permalink() ) ), '' ); ?> + ', esc_url( get_permalink() ) ), '' ); + } else { + the_title( sprintf( '

', esc_url( get_permalink() ) ), '

' ); + } ?>
diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php b/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php index 7f4a643fb4..4d8690a854 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content-gallery.php @@ -32,6 +32,8 @@ if ( is_single() ) { the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); } else { the_title( '

', '

' ); } diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-image.php b/wp-content/themes/twentyseventeen/template-parts/post/content-image.php index f40e1e67b4..66a6cc6b3b 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content-image.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content-image.php @@ -32,6 +32,8 @@ if ( is_single() ) { the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); } else { the_title( '

', '

' ); } diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-video.php b/wp-content/themes/twentyseventeen/template-parts/post/content-video.php index cfa37554bf..0d55ab4599 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content-video.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content-video.php @@ -32,6 +32,8 @@ if ( is_single() ) { the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); } else { the_title( '

', '

' ); } diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content.php b/wp-content/themes/twentyseventeen/template-parts/post/content.php index 7eeaa20e5c..ce5858f4d7 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content.php @@ -33,6 +33,8 @@ if ( is_single() ) { the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); } else { the_title( '

', '

' ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 2dcbf44522..6efa93affd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7.4-alpha-40435'; +$wp_version = '4.7.4-alpha-40459'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.