From d00545bd4012d6b8991e82864cb472bb37e95953 Mon Sep 17 00:00:00 2001 From: joedolson Date: Fri, 18 Jul 2025 03:31:28 +0000 Subject: [PATCH] Bundled Theme: Prevent output of empty title tags. In Twenty Ten, Twenty Eleven, Twenty Twelve, Twenty Thirteen, Twenty Fourteen, Twenty Fifteen, Twenty Sixteen, Twenty Seventeen, and Twenty Twenty, an empty site title would result in an empty heading and/or an empty link in the site header. These can pollute the heading hierarchy and add a un-named link in screen reader navigation. Prevent the output of wrapping tags if site title or site description have no value. Props tsquez, audrasjb, sabernhardt, rehanali, sukhendu2002, dilipbheda, sirlouen, joedolson. Fixes #44656. Built from https://develop.svn.wordpress.org/trunk@60483 git-svn-id: http://core.svn.wordpress.org/trunk@59819 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyeleven/header.php | 22 ++++++++++--- wp-content/themes/twentyfifteen/header.php | 31 +++++++++--------- wp-content/themes/twentyfourteen/header.php | 7 +++- .../template-parts/header/site-branding.php | 18 +++++++---- wp-content/themes/twentysixteen/header.php | 16 ++++++---- wp-content/themes/twentyten/header.php | 32 +++++++++++++------ wp-content/themes/twentythirteen/header.php | 15 +++++++-- wp-content/themes/twentytwelve/header.php | 18 +++++++++-- .../themes/twentytwenty/inc/template-tags.php | 4 +++ wp-includes/version.php | 2 +- 10 files changed, 114 insertions(+), 51 deletions(-) diff --git a/wp-content/themes/twentyeleven/header.php b/wp-content/themes/twentyeleven/header.php index 3859daae39..fe76023939 100644 --- a/wp-content/themes/twentyeleven/header.php +++ b/wp-content/themes/twentyeleven/header.php @@ -78,14 +78,26 @@ if ( is_singular() && get_option( 'thread_comments' ) ) {
- -

>

-

+ +

>

+ +

+
-

>

- -

>

- -

- +

>

+ +

>

+ +

+ +
diff --git a/wp-content/themes/twentyfourteen/header.php b/wp-content/themes/twentyfourteen/header.php index 945824853a..c62b86a411 100644 --- a/wp-content/themes/twentyfourteen/header.php +++ b/wp-content/themes/twentyfourteen/header.php @@ -50,7 +50,12 @@