Changeset 19524 for trunk/wp-admin/includes/update-core.php
- Timestamp:
- 12/01/2011 04:38:51 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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' );
Note: See TracChangeset
for help on using the changeset viewer.