wp_ajax_health_check_is_in_debug_mode

Advertisement

Summery Summery

Ajax handler for site health checks on debug mode.

Syntax Syntax

wp_ajax_health_check_is_in_debug_mode()

Source Source

File: wp-admin/includes/ajax-actions.php

function wp_ajax_health_check_is_in_debug_mode() {
	wp_verify_nonce( 'health-check-site-status' );

	if ( ! current_user_can( 'view_site_health_checks' ) ) {
		wp_send_json_error();
	}

	if ( ! class_exists( 'WP_Site_Health' ) ) {
		require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
	}

	$site_health = WP_Site_Health::get_instance();
	wp_send_json_success( $site_health->get_test_is_in_debug_mode() );
}

Advertisement

Changelog Changelog

Changelog
Version Description
5.2.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.