WordPress.org

Make WordPress Core

Changeset 47456


Ignore:
Timestamp:
03/14/2020 04:34:54 PM (3 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r47306 r47456  
    22192219    public function maybe_create_scheduled_event() {
    22202220        if ( ! wp_next_scheduled( 'wp_site_health_scheduled_check' ) && ! wp_installing() ) {
    2221             wp_schedule_event( time(), 'weekly', 'wp_site_health_scheduled_check' );
     2221            wp_schedule_event( time() + DAY_IN_SECONDS, 'weekly', 'wp_site_health_scheduled_check' );
    22222222        }
    22232223    }
Note: See TracChangeset for help on using the changeset viewer.