diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php index 8fb3bf428d..f681e72d2d 100644 --- a/src/wp-admin/update-core.php +++ b/src/wp-admin/update-core.php @@ -138,7 +138,7 @@ function dismissed_updates() { * @return null */ function core_upgrade_preamble() { - global $wp_version; + global $wp_version, $required_php_version, $required_mysql_version; $updates = get_core_updates(); @@ -146,6 +146,19 @@ function core_upgrade_preamble() { echo '

'; _e('You have the latest version of WordPress.'); echo '

'; + + if ( wp_http_supports( 'ssl' ) ) { + require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + $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 ); + if ( $should_auto_update ) + echo '

✔   This site is set up to install security updates of WordPress automatically. Cool!

'; + } } else { echo '

'; _e('Important: before updating, please back up your database and files. For help with updates, visit the Updating WordPress Codex page.'); @@ -156,21 +169,10 @@ function core_upgrade_preamble() { echo ''; } - // This is temporary, for the WordPress 3.7 beta period. if ( isset( $updates[0] ) && $updates[0]->response == 'development' ) { - require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; - $ssl_support = wp_http_supports( 'ssl' ); - $should_auto_update = WP_Automatic_Upgrader::should_auto_update( 'core', $updates[0], ABSPATH ); - if ( $ssl_support && $should_auto_update ) { - echo '

BETA TESTERS: This install will receive daily auto updates to future beta versions.'; - if ( get_locale() !== 'en_US' ) - echo ' Translations of importers and default themes will also be updated.'; - echo '

You will receive an email with debugging output after each update. If something goes wrong, please post in the support forums or open a bug report.

'; - } elseif ( ! $ssl_support ) { - echo '

BETA TESTERS: Your server does not support HTTP requests over SSL. This install will not receive auto updates.

'; - } elseif ( WP_Automatic_Upgrader::is_vcs_checkout( ABSPATH ) ) { - echo '

BETA TESTERS: This install uses version control (SVN or Git) and thus will not receive auto updates. Try a separate install of WordPress with the Beta Tester plugin set to bleeding edge.

'; - } + 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 ) ) + echo '

BETA TESTERS: This site is set up to install updates of future beta versions automatically.

'; } echo '