From 1f393181234585635f3307d1f29d19326e0dc91f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 3 Aug 2022 13:09:09 +0000 Subject: [PATCH] Site Health: Improve the wording in plugin and theme version tests. This displays a more appropriate message in case the site does not have any active plugins or installed themes. Follow-up to [44986], [45099], [45336]. Props Presskopp, costdev, martin.krcho, Clorith, SergeyBiryukov. Fixes #56134. Built from https://develop.svn.wordpress.org/trunk@53816 git-svn-id: http://core.svn.wordpress.org/trunk@53375 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-site-health.php | 14 ++++++++++++-- wp-includes/version.php | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php index fb8138f776..a2c8688ac7 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -428,7 +428,7 @@ class WP_Site_Health { '

%s

', __( 'Your site has 1 active plugin, and it is up to date.' ) ); - } else { + } elseif ( $plugins_active > 0 ) { $result['description'] .= sprintf( '

%s

', sprintf( @@ -441,6 +441,11 @@ class WP_Site_Health { $plugins_active ) ); + } else { + $result['description'] .= sprintf( + '

%s

', + __( 'Your site does not have any active plugins.' ) + ); } } @@ -591,7 +596,7 @@ class WP_Site_Health { '

%s

', __( 'Your site has 1 installed theme, and it is up to date.' ) ); - } else { + } elseif ( $themes_total > 0 ) { $result['description'] .= sprintf( '

%s

', sprintf( @@ -604,6 +609,11 @@ class WP_Site_Health { $themes_total ) ); + } else { + $result['description'] .= sprintf( + '

%s

', + __( 'Your site does not have any installed themes.' ) + ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 24fa96cb78..6c013a82a7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53815'; +$wp_version = '6.1-alpha-53816'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.