Make WordPress Core

Ticket #49814: 49814.patch

File 49814.patch, 2.0 KB (added by Clorith, 3 years ago)
  • src/js/_enqueues/admin/site-health.js

    diff --git a/src/js/_enqueues/admin/site-health.js b/src/js/_enqueues/admin/site-health.js
    a b  
    1212                _n = wp.i18n._n,
    1313                sprintf = wp.i18n.sprintf,
    1414                clipboard = new ClipboardJS( '.site-health-copy-buttons .copy-button' ),
     15                isSiteHealthPage = $( '.health-check-body' ).length,
     16                isStatusTab = $( '.health-check-body.health-check-status-tab' ).length,
    1517                isDebugTab = $( '.health-check-body.health-check-debug-tab' ).length,
    1618                pathsSizesSection = $( '#health-check-accordion-block-wp-paths-sizes' ),
    1719                successTimeout;
     
    229231                        wp.a11y.speak( __( 'All site health tests have finished running. There are items that should be addressed, and the results are now available on the page.' ) );
    230232                }
    231233
    232                 if ( ! isDebugTab ) {
     234                if ( isStatusTab ) {
    233235                        $.post(
    234236                                ajaxurl,
    235237                                {
     
    346348                appendIssue( wp.hooks.applyFilters( 'site_status_test_result', issue ) );
    347349        }
    348350
    349         if ( 'undefined' !== typeof SiteHealth && ! isDebugTab ) {
     351        if ( 'undefined' !== typeof SiteHealth ) {
    350352                if ( 0 === SiteHealth.site_status.direct.length && 0 === SiteHealth.site_status.async.length ) {
    351353                        recalculateProgression();
    352354                } else {
  • src/wp-admin/site-health.php

    diff --git a/src/wp-admin/site-health.php b/src/wp-admin/site-health.php
    a b  
    195195        <p><?php _e( 'The Site Health check requires JavaScript.' ); ?></p>
    196196</div>
    197197
    198 <div class="health-check-body hide-if-no-js">
     198<div class="health-check-body health-check-status-tab hide-if-no-js">
    199199        <div class="site-status-all-clear hide">
    200200                <p class="icon">
    201201                        <span class="dashicons dashicons-yes"></span>