Background Updates: Spread them over the hour. Props Pento. Merges r26149 to the 3.7 branch. Fixes #25833 for 3.7.
Built from https://develop.svn.wordpress.org/branches/3.7@26450 git-svn-id: http://core.svn.wordpress.org/branches/3.7@26348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f2e591e4c2
commit
bd4a5ae14a
|
@ -405,6 +405,9 @@ function upgrade_all() {
|
|||
if ( $wp_current_db_version < 25824 )
|
||||
upgrade_370();
|
||||
|
||||
if ( $wp_current_db_version < 26148 )
|
||||
upgrade_372();
|
||||
|
||||
maybe_disable_link_manager();
|
||||
|
||||
maybe_disable_automattic_widgets();
|
||||
|
@ -1222,6 +1225,18 @@ function upgrade_370() {
|
|||
wp_clear_scheduled_hook( 'wp_auto_updates_maybe_update' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute changes made in WordPress 3.7.2.
|
||||
*
|
||||
* @since 3.7.2
|
||||
* @since 3.8.0
|
||||
*/
|
||||
function upgrade_372() {
|
||||
global $wp_current_db_version;
|
||||
if ( $wp_current_db_version < 26148 )
|
||||
wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute network level changes
|
||||
*
|
||||
|
|
|
@ -584,6 +584,8 @@ function wp_schedule_update_checks() {
|
|||
$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' );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ $wp_version = '3.7.1';
|
|||
*
|
||||
* @global int $wp_db_version
|
||||
*/
|
||||
$wp_db_version = 25824;
|
||||
$wp_db_version = 26148;
|
||||
|
||||
/**
|
||||
* Holds the TinyMCE version
|
||||
|
|
Loading…
Reference in New Issue