mirror of
git://develop.git.wordpress.org/
synced 2025-04-09 06:32:28 +02:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@45049 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c833087131
commit
b45b58c6b6
@ -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' );
|
||||
?>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user