Make WordPress Core

Changeset 49122


Ignore:
Timestamp:
10/10/2020 08:22:41 PM (4 years ago)
Author:
johnbillion
Message:

Site Health: Remove an unused function that was erroneously added when the site health feature was introduced.

This function was and is never used as the is_in_debug_mode check is a direct one.

Fixes #50282

File:
1 edited

Legend:

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

    r49108 r49122  
    51605160
    51615161/**
    5162  * Ajax handler for site health checks on debug mode.
    5163  *
    5164  * @since 5.2.0
    5165  */
    5166 function wp_ajax_health_check_is_in_debug_mode() {
    5167     wp_verify_nonce( 'health-check-site-status' );
    5168 
    5169     if ( ! current_user_can( 'view_site_health_checks' ) ) {
    5170         wp_send_json_error();
    5171     }
    5172 
    5173     if ( ! class_exists( 'WP_Site_Health' ) ) {
    5174         require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
    5175     }
    5176 
    5177     $site_health = WP_Site_Health::get_instance();
    5178     wp_send_json_success( $site_health->get_test_is_in_debug_mode() );
    5179 }
    5180 
    5181 /**
    51825162 * Ajax handler for site health checks on background updates.
    51835163 *
Note: See TracChangeset for help on using the changeset viewer.