W3cubDocs

/WordPress

wp_ajax_health_check_loopback_requests()

Ajax handler for site health checks on loopback requests.

Source

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

function wp_ajax_health_check_loopback_requests() {
	check_ajax_referer( '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_loopback_requests() );
}

Changelog

Version Description
5.2.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_ajax_health_check_loopback_requests