WordPress.org

Make WordPress Core

Changeset 50530


Ignore:
Timestamp:
03/13/2021 10:57:27 AM (6 months ago)
Author:
SergeyBiryukov
Message:

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

Props Presskopp, hareesh-pillai.
Fixes #52521.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r50234 r50530  
    18741874    <?php else : ?>
    18751875        <p>
    1876             <?php if ( $issue_counts['critical'] > 0 ) : ?>
     1876            <?php if ( $issues_total <= 0 ) : ?>
     1877                <?php _e( 'Great job! Your site currently passes all site health checks.' ); ?>
     1878            <?php elseif ( 1 === (int) $issue_counts['critical'] ) : ?>
     1879                <?php _e( 'Your site has a critical issue that should be addressed as soon as possible to improve its performance and security.' ); ?>
     1880            <?php elseif ( $issue_counts['critical'] > 1 ) : ?>
    18771881                <?php _e( 'Your site has critical issues that should be addressed as soon as possible to improve its performance and security.' ); ?>
    1878             <?php elseif ( $issues_total <= 0 ) : ?>
    1879                 <?php _e( 'Great job! Your site currently passes all site health checks.' ); ?>
     1882            <?php elseif ( 1 === (int) $issue_counts['recommended'] ) : ?>
     1883                <?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.' ); ?>
    18801884            <?php else : ?>
    18811885                <?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.' ); ?>
Note: See TracChangeset for help on using the changeset viewer.