WordPress开发者和主题制作者的搜索引擎



wp_ajax_health_check_is_in_debug_mode ›

Since5.2.0
已弃用n/a
wp_ajax_health_check_is_in_debug_mode ( 没有参数 )
定义在:
文档:

Ajax handler for site health checks on debug mode.



源码

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

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

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

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