Make WordPress Core

Ticket #47606: 47606.2.diff

File 47606.2.diff, 780 bytes (added by xkon, 5 years ago)
  • src/wp-settings.php

    diff --git a/src/wp-settings.php b/src/wp-settings.php
    index cf4fffc6e7..cb975532f5 100644
    a b if ( ! is_multisite() ) { 
    352352}
    353353
    354354// Create an instance of WP_Site_Health so that Cron events may fire.
    355 if ( ! class_exists( 'WP_Site_Health' ) ) {
    356         require_once( ABSPATH . 'wp-admin/includes/class-wp-site-health.php' );
     355if ( 'DOING_AJAX' && isset( $_REQUEST['action'] ) && 'health-check-site-status-result' === $_REQUEST['action'] ) {
     356        if ( ! class_exists( 'WP_Site_Health' ) ) {
     357                require_once( ABSPATH . 'wp-admin/includes/class-wp-site-health.php' );
     358        }
     359        WP_Site_Health::initialize();
    357360}
    358 WP_Site_Health::initialize();
    359361
    360362// Load active plugins.
    361363foreach ( wp_get_active_and_valid_plugins() as $plugin ) {