In automatic background updates, standardize on 'update'.

New, final filter names:
 * auto_update_{$type} (plugin, theme, core, language)
 * automatic_updates_is_vcs_checkout
 * automatic_updates_disabled

New class name is WP_Automatic_Updater. Method names include update() and should_update().

see #22704.


git-svn-id: https://develop.svn.wordpress.org/trunk@25835 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2013-10-17 23:20:56 +00:00
parent ba10ec2cba
commit 8cb344e237
5 changed files with 47 additions and 56 deletions

View File

@@ -77,12 +77,12 @@ function find_core_auto_update() {
include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$auto_update = false;
$upgrader = new WP_Automatic_Upgrader;
$upgrader = new WP_Automatic_Updater;
foreach ( $updates->updates as $update ) {
if ( 'autoupdate' != $update->response )
continue;
if ( ! $upgrader->should_upgrade( 'core', $update, ABSPATH ) )
if ( ! $upgrader->should_update( 'core', $update, ABSPATH ) )
continue;
if ( ! $auto_update || version_compare( $update->current, $auto_update->current, '>' ) )