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:
Sergey Biryukov 2019-03-28 14:31:51 +00:00
parent ffc064d82d
commit d69165bd3b
4 changed files with 5 additions and 4 deletions

View File

@ -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' ) );

View File

@ -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' ) );

View File

@ -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' );
?>

View File

@ -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.