wp_ajax_health_check_background_updates
函数
      wp_ajax_health_check_background_updates ( No parameters )    
  - 相关
 - 
- WP_REST_Site_Health_Controller::test_background_updates()
 
 
- 定义位置
 - 
- 
                                  wp-admin/includes/ajax-actions.php
, line 5306 
 - 
                                  wp-admin/includes/ajax-actions.php
 
- 引入
 - 5.2.0
 
- 弃用
 - 5.6.0
 
Ajax handler for site health checks on background updates.
function wp_ajax_health_check_background_updates() {
	_doing_it_wrong(
		'wp_ajax_health_check_background_updates',
		sprintf(
		// translators: 1: The Site Health action that is no longer used by core. 2: The new function that replaces it.
			__( 'The Site Health check for %1$s has been replaced with %2$s.' ),
			'wp_ajax_health_check_background_updates',
			'WP_REST_Site_Health_Controller::test_background_updates'
		),
		'5.6.0'
	);
	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_background_updates() );
}
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。