WP_Site_Health_Auto_Updates::test_wp_version_check_attached() WordPress Method

This function runs the wp_version_check() function and checks whether the returned object has an 'errors' property.

WP_Site_Health_Auto_Updates::test_wp_version_check_attached() #

Check if updates are intercepted by a filter.


Return

(array) The test results.


Top ↑

Source

File: wp-admin/includes/class-wp-site-health-auto-updates.php

	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',
			);
		}
	}


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.