Site Health: Correct `wp_version_check()` existence verification by performing a request to the Site Health page instead of Dashboard.
Props Clorith, audrasjb. Fixes #46616. Built from https://develop.svn.wordpress.org/trunk@45049 git-svn-id: http://core.svn.wordpress.org/trunk@44858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ffc064d82d
commit
d69165bd3b
|
@ -101,7 +101,7 @@ class WP_Site_Health_Auto_Updates {
|
|||
array(
|
||||
'health-check-test-wp_version_check' => true,
|
||||
),
|
||||
admin_url()
|
||||
admin_url( 'site-health.php' )
|
||||
);
|
||||
|
||||
$test = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout' ) );
|
||||
|
|
|
@ -28,8 +28,6 @@ class WP_Site_Health {
|
|||
public function __construct() {
|
||||
$this->prepare_sql_data();
|
||||
|
||||
add_action( 'wp_loaded', array( $this, 'check_wp_version_check_exists' ) );
|
||||
|
||||
add_filter( 'admin_body_class', array( $this, 'admin_body_class' ) );
|
||||
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
||||
|
|
|
@ -27,6 +27,9 @@ if ( ! class_exists( 'WP_Site_Health' ) ) {
|
|||
|
||||
$health_check_site_status = new WP_Site_Health();
|
||||
|
||||
// Start by checking if this is a special request checking for the existence of certain filters.
|
||||
$health_check_site_status->check_wp_version_check_exists();
|
||||
|
||||
require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
?>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.2-beta1-45048';
|
||||
$wp_version = '5.2-beta1-45049';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue