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.
Fixes #49577.

git-svn-id: https://develop.svn.wordpress.org/trunk@47456 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-03-14 16:34:54 +00:00
parent c3156e6258
commit a2861f1277
1 changed files with 1 additions and 1 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' );
}
}