W3cubDocs

/WordPress

WP_Site_Health_Auto_Updates::test_wp_version_check_attached(): array

Checks if updates are intercepted by a filter.

Return

array The test results.

Source

public function test_wp_version_check_attached() {
	if ( ( ! is_multisite() || is_main_site() && is_network_admin() )
		&& ! has_filter( 'wp_version_check', 'wp_version_check' )
	) {
		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',
		);
	}
}

Changelog

Version Description
5.2.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_site_health_auto_updates/test_wp_version_check_attached