mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
Site Health instantiation prevents use of some hooks by plugins.
As the WP_Site_Health class is instantiated prior to plugins being required and the `plugins_loaded` hook being fired, it prevents plugins from using the following hooks in the functions called by `maybe_create_scheduled_event()`. Brings [47568] to the 5.4 branch. Fixes #49824. Props peterwilsoncc, whyisjake. Built from https://develop.svn.wordpress.org/branches/5.4@47569 git-svn-id: http://core.svn.wordpress.org/branches/5.4@47344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3209b0f668
commit
02310525f4
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.4.1-alpha-47567';
|
||||
$wp_version = '5.4.1-alpha-47569';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
@ -365,12 +365,6 @@ if ( ! is_multisite() ) {
|
||||
wp_recovery_mode()->initialize();
|
||||
}
|
||||
|
||||
// Create an instance of WP_Site_Health so that Cron events may fire.
|
||||
if ( ! class_exists( 'WP_Site_Health' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
|
||||
}
|
||||
WP_Site_Health::get_instance();
|
||||
|
||||
// Load active plugins.
|
||||
foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
|
||||
wp_register_plugin_realpath( $plugin );
|
||||
@ -523,6 +517,12 @@ unset( $theme );
|
||||
*/
|
||||
do_action( 'after_setup_theme' );
|
||||
|
||||
// Create an instance of WP_Site_Health so that Cron events may fire.
|
||||
if ( ! class_exists( 'WP_Site_Health' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
|
||||
}
|
||||
WP_Site_Health::get_instance();
|
||||
|
||||
// Set up current user.
|
||||
$GLOBALS['wp']->init();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user