WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Site_Health_Auto_Updates::test_wp_version_check_attached() public WP 5.2.0

Check if updates are intercepted by a filter.

Это метод класса: WP_Site_Health_Auto_Updates{}

Хуки из метода
Возвращает

Массив. The test results.

Использование

$WP_Site_Health_Auto_Updates = new WP_Site_Health_Auto_Updates();
$WP_Site_Health_Auto_Updates->test_wp_version_check_attached();

Список изменений

С версии 5.2.0 Введена.

Код WP_Site_Health_Auto_Updates::test_wp_version_check_attached() WP 5.5.1

wp-admin/includes/class-wp-site-health-auto-updates.php
<?php
public function test_wp_version_check_attached() {
	if ( ! is_main_site() ) {
		return;
	}

	$cookies = wp_unslash( $_COOKIE );
	$timeout = 10;
	$headers = array(
		'Cache-Control' => 'no-cache',
	);
	/** This filter is documented in wp-includes/class-wp-http-streams.php */
	$sslverify = apply_filters( 'https_local_ssl_verify', false );

	// Include Basic auth in loopback requests.
	if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) {
		$headers['Authorization'] = 'Basic ' . base64_encode( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) . ':' . wp_unslash( $_SERVER['PHP_AUTH_PW'] ) );
	}

	$url = add_query_arg(
		array(
			'health-check-test-wp_version_check' => true,
		),
		admin_url( 'site-health.php' )
	);

	$test = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) );

	if ( is_wp_error( $test ) ) {
		return array(
			'description' => sprintf(
				/* translators: %s: Name of the filter used. */
				__( 'Could not confirm that the %s filter is available.' ),
				'<code>wp_version_check()</code>'
			),
			'severity'    => 'warning',
		);
	}

	$response = wp_remote_retrieve_body( $test );

	if ( 'yes' !== $response ) {
		return array(
			'description' => sprintf(
				/* translators: %s: Name of the filter used. */
				__( 'A plugin has prevented updates by disabling %s.' ),
				'<code>wp_version_check()</code>'
			),
			'severity'    => 'fail',
		);
	}
}