Make WordPress Core

Ticket #52966: 52966.patch

File 52966.patch, 5.4 KB (added by Clorith, 4 years ago)
  • src/wp-admin/css/site-health.css

    diff --git a/src/wp-admin/css/site-health.css b/src/wp-admin/css/site-health.css
    a b  
    3030}
    3131
    3232.health-check-title-section {
     33        clear: both;
     34        text-align: center;
     35        padding-top: 8px;
     36}
     37.site-health .health-check-title-section {
    3338        display: flex;
    3439        align-items: center;
    3540        justify-content: center;
    36         clear: both;
    3741}
     42
    3843
    3944.site-health-progress-wrapper {
    4045        margin-bottom: 1rem;
     
    458463        flex-shrink: 0;
    459464}
    460465
     466/* Styling unique to the dashboard widget */
     467#dashboard_site_health .site-health-details {
     468        border-left: 1px solid #c3c4c7;
     469        padding-left: 16px;
     470}
     471#dashboard_site_health .inside {
     472        display: grid;
     473        grid-template-columns: 1fr 2fr;
     474        grid-auto-rows: minmax(64px, auto);
     475        column-gap: 16px;
     476        align-items: center;
     477}
     478@media screen and (max-width: 480px) {
     479        #dashboard_site_health .inside {
     480                grid-template-columns: 100%;
     481        }
     482        #dashboard_site_health .site-health-details {
     483                border-left: none;
     484        }
     485}
     486
    461487@media screen and (max-width: 782px) {
    462488        .health-check-body {
    463489                margin: 0 12px;
  • src/wp-admin/includes/dashboard.php

    diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php
    a b  
    19071907                </div>
    19081908        </div>
    19091909
    1910         <?php if ( false === $get_issues ) : ?>
    1911                 <p>
    1912                         <?php
    1913                         printf(
    1914                                 /* translators: %s: URL to Site Health screen. */
    1915                                 __( 'Site health checks will automatically run periodically to gather information about your site. You can also <a href="%s">visit the Site Health screen</a> to gather information about your site now.' ),
    1916                                 esc_url( admin_url( 'site-health.php' ) )
    1917                         );
    1918                         ?>
    1919                 </p>
    1920         <?php else : ?>
    1921                 <p>
    1922                         <?php if ( $issues_total <= 0 ) : ?>
    1923                                 <?php _e( 'Great job! Your site currently passes all site health checks.' ); ?>
    1924                         <?php elseif ( 1 === (int) $issue_counts['critical'] ) : ?>
    1925                                 <?php _e( 'Your site has a critical issue that should be addressed as soon as possible to improve its performance and security.' ); ?>
    1926                         <?php elseif ( $issue_counts['critical'] > 1 ) : ?>
    1927                                 <?php _e( 'Your site has critical issues that should be addressed as soon as possible to improve its performance and security.' ); ?>
    1928                         <?php elseif ( 1 === (int) $issue_counts['recommended'] ) : ?>
    1929                                 <?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.' ); ?>
    1930                         <?php else : ?>
    1931                                 <?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.' ); ?>
    1932                         <?php endif; ?>
    1933                 </p>
    1934         <?php endif; ?>
     1910        <div class="site-health-details">
     1911                <?php if ( false === $get_issues ) : ?>
     1912                        <p>
     1913                                <?php
     1914                                printf(
     1915                                        /* translators: %s: URL to Site Health screen. */
     1916                                        __( 'Site health checks will automatically run periodically to gather information about your site. You can also <a href="%s">visit the Site Health screen</a> to gather information about your site now.' ),
     1917                                        esc_url( admin_url( 'site-health.php' ) )
     1918                                );
     1919                                ?>
     1920                        </p>
     1921                <?php else : ?>
     1922                        <p>
     1923                                <?php if ( $issues_total <= 0 ) : ?>
     1924                                        <?php _e( 'Great job! Your site currently passes all site health checks.' ); ?>
     1925                                <?php elseif ( 1 === (int) $issue_counts['critical'] ) : ?>
     1926                                        <?php _e( 'Your site has a critical issue that should be addressed as soon as possible to improve its performance and security.' ); ?>
     1927                                <?php elseif ( $issue_counts['critical'] > 1 ) : ?>
     1928                                        <?php _e( 'Your site has critical issues that should be addressed as soon as possible to improve its performance and security.' ); ?>
     1929                                <?php elseif ( 1 === (int) $issue_counts['recommended'] ) : ?>
     1930                                        <?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.' ); ?>
     1931                                <?php else : ?>
     1932                                        <?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.' ); ?>
     1933                                <?php endif; ?>
     1934                        </p>
     1935                <?php endif; ?>
    19351936
    1936         <?php if ( $issues_total > 0 && false !== $get_issues ) : ?>
    1937                 <p>
    1938                         <?php
    1939                         printf(
    1940                                 /* translators: 1: Number of issues. 2: URL to Site Health screen. */
    1941                                 _n(
    1942                                         'Take a look at the <strong>%1$d item</strong> on the <a href="%2$s">Site Health screen</a>.',
    1943                                         'Take a look at the <strong>%1$d items</strong> on the <a href="%2$s">Site Health screen</a>.',
    1944                                         $issues_total
    1945                                 ),
    1946                                 $issues_total,
    1947                                 esc_url( admin_url( 'site-health.php' ) )
    1948                         );
    1949                         ?>
    1950                 </p>
    1951         <?php endif; ?>
     1937                <?php if ( $issues_total > 0 && false !== $get_issues ) : ?>
     1938                        <p>
     1939                                <?php
     1940                                printf(
     1941                                        /* translators: 1: Number of issues. 2: URL to Site Health screen. */
     1942                                        _n(
     1943                                                'Take a look at the <strong>%1$d item</strong> on the <a href="%2$s">Site Health screen</a>.',
     1944                                                'Take a look at the <strong>%1$d items</strong> on the <a href="%2$s">Site Health screen</a>.',
     1945                                                $issues_total
     1946                                        ),
     1947                                        $issues_total,
     1948                                        esc_url( admin_url( 'site-health.php' ) )
     1949                                );
     1950                                ?>
     1951                        </p>
     1952                <?php endif; ?>
     1953        </div>
    19521954
    19531955        <?php
    19541956}