WordPress.org

Make WordPress Core

Changeset 47466


Ignore:
Timestamp:
03/17/2020 07:23:14 PM (2 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.
Reviewed by whyisjake, SergeyBiryukov.
Merges [47456] to the 5.4 branch.
Fixes #49577.

Location:
branches/5.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.4

  • branches/5.4/src/wp-admin/includes/class-wp-site-health.php

    r47306 r47466  
    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.