mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-08 17:38:26 +01:00
Background Updates: Remove the 7am/7pm background update check. This check was made redundant by [28129] as background updates are now run after a version check takes place.
See #27772, #35323. Built from https://develop.svn.wordpress.org/trunk@36180 git-svn-id: http://core.svn.wordpress.org/trunk@36147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7d378fce01
commit
06a3f799e7
@ -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.
|
||||
*
|
||||
|
@ -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' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user