Changeset 19524
- Timestamp:
- 12/01/2011 04:38:51 AM (13 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/about.php
r19498 r19524 161 161 162 162 <div class="return-to-dashboard"> 163 <?php if ( current_user_can( 'update_core' ) && isset( $_GET['upgraded'] ) ) : ?> 164 <a href="<?php echo esc_url( admin_url( 'update-core.php' ) ); ?>"><?php _e( 'Return to Dashboard → Updates' ); ?></a> | 163 <?php if ( current_user_can( 'update_core' ) && isset( $_GET['updated'] ) ) : ?> 164 <a href="<?php echo esc_url( network_admin_url( 'update-core.php' ) ); ?>"><?php 165 is_multisite() ? _e( 'Return to Updates' ) : _e( 'Return to Dashboard → Updates' ); 166 ?></a> | 165 167 <?php endif; ?> 166 168 <a href="<?php echo esc_url( admin_url() ); ?>"><?php _e( 'Go to Dashboard → Home' ); ?></a> -
trunk/wp-admin/includes/update-core.php
r19442 r19524 466 466 // Remove maintenance file, we're done. 467 467 $wp_filesystem->delete($maintenance_file); 468 469 // If we made it this far: 470 do_action( '_core_updated_successfully', $wp_version ); 471 472 return $wp_version; 468 473 } 469 474 … … 526 531 * Redirect to the About WordPress page after a successful upgrade. 527 532 * 528 * This is a temporary function for the 3.3 upgrade only and will be removed in a later version.529 * 533 * This function is only needed when the existing install is older than 3.3.0. 534 * 530 535 * @since 3.3.0 531 536 * 532 537 */ 533 function _redirect_to_about_wordpress() { 534 // Only for WP version < 3.3.0 535 if ( version_compare( $GLOBALS['wp_version'], '3.3.0', '>' ) ) 536 return; 537 ?> 538 function _redirect_to_about_wordpress( $wp_version ) { 539 // Load the updated default text localization domain for new strings 540 load_default_textdomain(); 541 542 // See do_core_upgrade() 543 show_message( __('WordPress updated successfully') ); 544 show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.' ), $wp_version, esc_url( admin_url( 'about.php?updated' ) ) ) . '</span>' ); 545 show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $wp_version, esc_url( admin_url( 'about.php?updated' ) ) ) . '</span>' ); 546 echo '</div>'; 547 ?> 538 548 <script type="text/javascript"> 539 window.location = '<?php echo admin_url( 'about.php?up graded' ); ?>';549 window.location = '<?php echo admin_url( 'about.php?updated' ); ?>'; 540 550 </script> 541 <?php 551 <?php 552 553 // Include admin-footer.php and exit 554 include(ABSPATH . 'wp-admin/admin-footer.php'); 555 exit(); 542 556 } 543 544 add_action( 'admin_footer-update-core.php', '_redirect_to_about_wordpress' ); 545 ?> 557 if ( version_compare( $GLOBALS['wp_version'], '3.3', '<' ) && 'update-core.php' == $pagenow ) 558 add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' ); -
trunk/wp-admin/update-core.php
r19511 r19524 379 379 if ('up_to_date' != $result->get_error_code() ) 380 380 show_message( __('Installation Failed') ); 381 } else { 382 show_message( __('WordPress updated successfully') ); 383 show_message( '<a href="' . esc_url( self_admin_url() ) . '">' . __('Go to Dashboard') . '</a>' ); 384 } 385 echo '</div>'; 381 echo '</div>'; 382 return; 383 } 384 385 show_message( __('WordPress updated successfully') ); 386 show_message( __('WordPress updated successfully') ); 387 show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.' ), $result, esc_url( admin_url( 'about.php?updated' ) ) ) . '</span>' ); 388 show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $result, esc_url( admin_url( 'about.php?updated' ) ) ) . '</span>' ); 389 ?> 390 </div> 391 <script type="text/javascript"> 392 //window.location = '<?php echo admin_url( 'about.php?upgraded' ); ?>'; 393 </script> 394 <?php 386 395 } 387 396
Note: See TracChangeset
for help on using the changeset viewer.