Changeset 49638
- Timestamp:
- 11/17/2020 08:26:32 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/update-core.php
r49631 r49638 63 63 64 64 if ( 'development' === $update->response ) { 65 $message = __( 'You are using a development version of WordPress. Youcan update to the latest nightly build manually:' );65 $message = __( 'You can update to the latest nightly build manually:' ); 66 66 } else { 67 67 if ( $current ) { … … 233 233 $updates = get_core_updates(); 234 234 235 if ( ! isset( $updates[0]->response ) || 'latest' === $updates[0]->response ) { 236 echo '<h2>'; 237 _e( 'You have the latest version of WordPress.' ); 238 239 if ( wp_http_supports( array( 'ssl' ) ) ) { 240 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 241 $upgrader = new WP_Automatic_Updater; 242 $future_minor_update = (object) array( 243 'current' => $wp_version . '.1.next.minor', 244 'version' => $wp_version . '.1.next.minor', 245 'php_version' => $required_php_version, 246 'mysql_version' => $required_mysql_version, 247 ); 248 $should_auto_update = $upgrader->should_update( 'core', $future_minor_update, ABSPATH ); 249 if ( $should_auto_update ) { 250 echo ' ' . __( 'Future security updates will be applied automatically.' ); 251 } 252 } 253 echo '</h2>'; 254 } 255 256 if ( isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) { 235 if ( isset( $updates[0] ) && isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) { 257 236 echo '<h2 class="response">'; 258 237 _e( 'An updated version of WordPress is available.' ); … … 267 246 ); 268 247 echo '</p></div>'; 269 } 270 271 if ( isset( $updates[0] ) && 'development' === $updates[0]->response ) { 272 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 273 $upgrader = new WP_Automatic_Updater; 274 if ( wp_http_supports( 'ssl' ) && $upgrader->should_update( 'core', $updates[0], ABSPATH ) ) { 275 echo '<div class="updated inline"><p>'; 276 echo '<strong>' . __( 'BETA TESTERS:' ) . '</strong> ' . __( 'This site is set up to install updates of future beta versions automatically.' ); 277 echo '</p></div>'; 278 } 248 } elseif ( isset( $updates[0] ) && 'development' === $updates[0]->response ) { 249 echo '<h2 class="response">' . __( 'You are using a development version of WordPress.' ) . '</h2>'; 250 } else { 251 echo '<h2 class="response">' . __( 'You have the latest version of WordPress.' ) . '</h2>'; 279 252 } 280 253 … … 396 369 <p class="auto-update-status"> 397 370 <?php 398 if ( $upgrade_major ) { 371 require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; 372 $updater = new WP_Automatic_Updater(); 373 if ( $updater->is_vcs_checkout( ABSPATH ) ) { 374 _e( 'This site appears to be under version control. Automatic updates are disabled.' ); 375 } elseif ( $upgrade_major ) { 399 376 _e( 'This site is automatically kept up to date with each new version of WordPress.' ); 400 377 … … 402 379 echo '<br>'; 403 380 printf( 404 '<a href="%s" >%s</a>',381 '<a href="%s" class="core-auto-update-settings-link core-auto-update-settings-link-disable">%s</a>', 405 382 wp_nonce_url( add_query_arg( 'value', 'disable', $action_url ), 'core-major-auto-updates-nonce' ), 406 383 __( 'Switch to automatic updates for maintenance and security releases only.' ) … … 408 385 } 409 386 } elseif ( $upgrade_minor ) { 410 _e( 'This site is automatically kept up to date with maintenance and security releases of WordPress .' );387 _e( 'This site is automatically kept up to date with maintenance and security releases of WordPress only.' ); 411 388 412 389 if ( $can_set_update_option ) { 413 390 echo '<br>'; 414 391 printf( 415 '<a href="%s" >%s</a>',392 '<a href="%s" class="core-auto-update-settings-link core-auto-update-settings-link-enable">%s</a>', 416 393 wp_nonce_url( add_query_arg( 'value', 'enable', $action_url ), 'core-major-auto-updates-nonce' ), 417 394 __( 'Enable automatic updates for all new versions of WordPress.' ) -
trunk/src/wp-includes/functions.php
r49629 r49638 1187 1187 'admin_email_remind_later', 1188 1188 'approved', 1189 'core-major-auto-updates-saved', 1189 1190 'deactivate', 1190 1191 'delete_count',
Note: See TracChangeset
for help on using the changeset viewer.