Changeset 25816
- Timestamp:
- 10/16/2013 07:40:02 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/update-core.php
r25806 r25816 139 139 */ 140 140 function core_upgrade_preamble() { 141 global $wp_version ;141 global $wp_version, $required_php_version, $required_mysql_version; 142 142 143 143 $updates = get_core_updates(); … … 147 147 _e('You have the latest version of WordPress.'); 148 148 echo '</h3>'; 149 150 if ( wp_http_supports( 'ssl' ) ) { 151 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 152 $future_minor_update = (object) array( 153 'current' => $wp_version . '.1-update-core.php', 154 'version' => $wp_version . '.1-update-core.php', 155 'php_version' => $required_php_version, 156 'mysql_version' => $required_mysql_version, 157 ); 158 $should_auto_update = WP_Automatic_Upgrader::should_auto_update( 'core', $future_minor_update, ABSPATH ); 159 if ( $should_auto_update ) 160 echo '<div class="updated inline"><p>✔ This site is set up to install security updates of WordPress automatically. Cool!</p></div>'; 161 } 149 162 } else { 150 163 echo '<div class="updated inline"><p>'; … … 157 170 } 158 171 159 // This is temporary, for the WordPress 3.7 beta period.160 172 if ( isset( $updates[0] ) && $updates[0]->response == 'development' ) { 161 require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 162 $ssl_support = wp_http_supports( 'ssl' ); 163 $should_auto_update = WP_Automatic_Upgrader::should_auto_update( 'core', $updates[0], ABSPATH ); 164 if ( $ssl_support && $should_auto_update ) { 165 echo '<div class="updated inline"><p><strong>BETA TESTERS: This install will receive daily auto updates to future beta versions.</strong>'; 166 if ( get_locale() !== 'en_US' ) 167 echo ' Translations of importers and default themes will also be updated.'; 168 echo '</p><p>You will receive an email with debugging output after each update. If something goes wrong, please <a href="http://wordpress.org/support/forum/alphabeta">post in the support forums</a> or <a href="https://core.trac.wordpress.org/">open a bug report</a>.</div>'; 169 } elseif ( ! $ssl_support ) { 170 echo '<div class="error inline"><p><strong>BETA TESTERS:</strong> Your server does not support HTTP requests over SSL. This install will not receive auto updates.</p></div>'; 171 } elseif ( WP_Automatic_Upgrader::is_vcs_checkout( ABSPATH ) ) { 172 echo '<div class="error inline"><p><strong>BETA TESTERS:</strong> This install uses version control (SVN or Git) and thus will not receive auto updates. Try a separate install of WordPress with the <a href="http://wordpress.org/plugins/wordpress-beta-tester/">Beta Tester</a> plugin set to bleeding edge.</p></div>'; 173 } 173 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 174 if ( wp_http_supports( 'ssl' ) && WP_Automatic_Upgrader::should_auto_update( 'core', $updates[0], ABSPATH ) ) 175 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>'; 174 176 } 175 177
Note: See TracChangeset
for help on using the changeset viewer.