Site Health: Use a singular string in dashboard widget if there is only one critical issue or recommendation.

Props Presskopp, hareesh-pillai.
Fixes #52521.
Built from https://develop.svn.wordpress.org/trunk@50530


git-svn-id: http://core.svn.wordpress.org/trunk@50143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-03-13 10:59:02 +00:00
parent cb55990e50
commit 3f03bb352e
2 changed files with 8 additions and 4 deletions

View File

@ -1873,10 +1873,14 @@ function wp_dashboard_site_health() {
</p>
<?php else : ?>
<p>
<?php if ( $issue_counts['critical'] > 0 ) : ?>
<?php _e( 'Your site has critical issues that should be addressed as soon as possible to improve its performance and security.' ); ?>
<?php elseif ( $issues_total <= 0 ) : ?>
<?php if ( $issues_total <= 0 ) : ?>
<?php _e( 'Great job! Your site currently passes all site health checks.' ); ?>
<?php elseif ( 1 === (int) $issue_counts['critical'] ) : ?>
<?php _e( 'Your site has a critical issue that should be addressed as soon as possible to improve its performance and security.' ); ?>
<?php elseif ( $issue_counts['critical'] > 1 ) : ?>
<?php _e( 'Your site has critical issues that should be addressed as soon as possible to improve its performance and security.' ); ?>
<?php elseif ( 1 === (int) $issue_counts['recommended'] ) : ?>
<?php _e( 'Your site&#8217;s health is looking good, but there is still one thing you can do to improve its performance and security.' ); ?>
<?php else : ?>
<?php _e( 'Your site&#8217;s health is looking good, but there are still some things you can do to improve its performance and security.' ); ?>
<?php endif; ?>

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-50529';
$wp_version = '5.8-alpha-50530';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.