wp_ajax_health_check_site_status_result() WordPress Function

The wp_ajax_health_check_site_status_result() function is used to retrieve the results of a site status check from the WordPress health check API.

wp_ajax_health_check_site_status_result() #

Ajax handler for site health check to update the result status.


Source

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

function wp_ajax_health_check_site_status_result() {
	check_ajax_referer( 'health-check-site-status-result' );

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

	set_transient( 'health-check-site-status-result', wp_json_encode( $_POST['counts'] ) );

	wp_send_json_success();
}


Top ↑

Changelog

Changelog
VersionDescription
5.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More