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

@@ -44,14 +44,14 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
$can_auto_update = wp_http_supports( 'ssl' );
if ( $can_auto_update ) {
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$upgrader = new WP_Automatic_Upgrader;
$upgrader = new WP_Automatic_Updater;
$future_minor_update = (object) array(
'current' => $wp_version . '.1-about.php',
'version' => $wp_version . '.1-about.php',
'php_version' => $required_php_version,
'mysql_version' => $required_mysql_version,
);
$can_auto_update = $upgrader->should_upgrade( 'core', $future_minor_update, ABSPATH );
$can_auto_update = $upgrader->should_update( 'core', $future_minor_update, ABSPATH );
}
if ( $can_auto_update ) : ?>
<p><?php _e( '&rarr; This site <strong>is</strong> able to apply these updates automatically. Cool!' ); ?></p>