mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
Make WP_Automatic_Upgrader a proper object that gets instantiated. Renames nearly all of its methods.
Also renames wp_auto_updates_maybe_update() to wp_maybe_auto_update(). see #22704. git-svn-id: https://develop.svn.wordpress.org/trunk@25823 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -148,13 +148,14 @@ function core_upgrade_preamble() {
|
||||
|
||||
if ( wp_http_supports( 'ssl' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
||||
$upgrader = new WP_Automatic_Upgrader;
|
||||
$future_minor_update = (object) array(
|
||||
'current' => $wp_version . '.1-update-core.php',
|
||||
'version' => $wp_version . '.1-update-core.php',
|
||||
'php_version' => $required_php_version,
|
||||
'mysql_version' => $required_mysql_version,
|
||||
);
|
||||
$should_auto_update = WP_Automatic_Upgrader::should_auto_update( 'core', $future_minor_update, ABSPATH );
|
||||
$should_auto_update = $upgrader->should_upgrade( 'core', $future_minor_update, ABSPATH );
|
||||
if ( $should_auto_update )
|
||||
echo ' ' . __( 'Future security updates will be applied automatically.' );
|
||||
}
|
||||
@@ -171,7 +172,8 @@ function core_upgrade_preamble() {
|
||||
|
||||
if ( isset( $updates[0] ) && $updates[0]->response == 'development' ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
||||
if ( wp_http_supports( 'ssl' ) && WP_Automatic_Upgrader::should_auto_update( 'core', $updates[0], ABSPATH ) )
|
||||
$upgrader = new WP_Automatic_Upgrader;
|
||||
if ( wp_http_supports( 'ssl' ) && $upgrader->should_upgrade( 'core', $updates[0], ABSPATH ) )
|
||||
echo '<div class="updated inline"><p><strong>BETA TESTERS:</strong> This site is set up to install updates of future beta versions automatically.</p></div>';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user