Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_ajax_health_check_dotorg_communication ›

Desde5.2.0
Obsoleton/a
wp_ajax_health_check_dotorg_communication ( Sem parâmetros )
Definido em:
Codex:

Ajax handler for site health checks on server communication.



Fonte

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