Site Health: Run the first scheduled site health check a day after the initial site setup.

This reduces the chance of displaying incorrect results due to running the check too early in first time setup scenarios.

Props Clorith, garrett-eclipse, roytanck, joostdevalk.
Reviewed by whyisjake, SergeyBiryukov.
Merges [47456] to the 5.4 branch.
Fixes #49577.
Built from https://develop.svn.wordpress.org/branches/5.4@47466


git-svn-id: http://core.svn.wordpress.org/branches/5.4@47253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-03-17 19:25:07 +00:00
parent 15246c6e39
commit 891db8e7b0
2 changed files with 2 additions and 2 deletions

View File

@ -2218,7 +2218,7 @@ class WP_Site_Health {
*/
public function maybe_create_scheduled_event() {
if ( ! wp_next_scheduled( 'wp_site_health_scheduled_check' ) && ! wp_installing() ) {
wp_schedule_event( time(), 'weekly', 'wp_site_health_scheduled_check' );
wp_schedule_event( time() + DAY_IN_SECONDS, 'weekly', 'wp_site_health_scheduled_check' );
}
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.4-RC2-47465';
$wp_version = '5.4-RC2-47466';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.