diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index fd9b3dc98c..9efaf40daf 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -549,6 +549,9 @@ function upgrade_all() { if ( $wp_current_db_version < 35700 ) upgrade_440(); + if ( $wp_current_db_version < 36180 ) + upgrade_450(); + maybe_disable_link_manager(); maybe_disable_automattic_widgets(); @@ -1659,6 +1662,20 @@ function upgrade_440() { } } +/** + * Execute changes made in WordPress 4.5.0 + * + * @ignore + * @since 4.5.0 + * + * @global int $wp_current_db_version + */ +function upgrade_450() { + global $wp_current_db_version; + if ( $wp_current_db_version < 36180 ) + wp_clear_scheduled_hook( 'wp_maybe_auto_update' ); +} + /** * Executes network-level upgrade routines. * diff --git a/wp-includes/update.php b/wp-includes/update.php index ec8cdbaa8a..2104b2eecd 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -169,7 +169,7 @@ function wp_version_check( $extra_stats = array(), $force_check = false ) { } } - // Trigger a background updates check if running non-interactively, and we weren't called from the update handler. + // Trigger background updates if running non-interactively, and we weren't called from the update handler. if ( defined( 'DOING_CRON' ) && DOING_CRON && ! doing_action( 'wp_maybe_auto_update' ) ) { do_action( 'wp_maybe_auto_update' ); } @@ -647,20 +647,6 @@ function wp_schedule_update_checks() { if ( ! wp_next_scheduled( 'wp_update_themes' ) && ! wp_installing() ) wp_schedule_event(time(), 'twicedaily', 'wp_update_themes'); - - if ( ! wp_next_scheduled( 'wp_maybe_auto_update' ) && ! wp_installing() ) { - // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site. - $next = strtotime( 'today 7am' ); - $now = time(); - // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now. - while ( ( $now + 3 * HOUR_IN_SECONDS ) > $next ) { - $next += 12 * HOUR_IN_SECONDS; - } - $next = $next - get_option( 'gmt_offset' ) * HOUR_IN_SECONDS; - // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour - $next = $next + rand( 0, 59 ) * MINUTE_IN_SECONDS; - wp_schedule_event( $next, 'twicedaily', 'wp_maybe_auto_update' ); - } } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 5b54cb4962..3f193c31c0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,14 +4,14 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36179'; +$wp_version = '4.5-alpha-36180'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * * @global int $wp_db_version */ -$wp_db_version = 35700; +$wp_db_version = 36180; /** * Holds the TinyMCE version