WordPress.org

Make WordPress Core

Changeset 19442


Ignore:
Timestamp:
11/23/2011 11:38:36 PM (6 years ago)
Author:
nacin
Message:

Redirect to about.php on update. props ocean90. see #18467.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/about.php

    r19437 r19442  
    162162
    163163<div class="return-to-dashboard">
    164     <a href="<?php echo admin_url( 'update-core.php' ); ?>"><?php _e( 'Return to Dashboard &rarr; Updates' ); ?></a> |
    165     <a href="<?php echo admin_url(); ?>"><?php _e( 'Go to Dashboard &rarr; Home' ); ?></a>
     164    <?php if ( current_user_can( 'update_core' ) && isset( $_GET['upgraded'] ) ) : ?>
     165    <a href="<?php echo esc_url( admin_url( 'update-core.php' ) ); ?>"><?php _e( 'Return to Dashboard &rarr; Updates' ); ?></a> |
     166    <?php endif; ?>
     167    <a href="<?php echo esc_url( admin_url() ); ?>"><?php _e( 'Go to Dashboard &rarr; Home' ); ?></a>
    166168</div>
    167169
  • trunk/wp-admin/includes/update-core.php

    r19066 r19442  
    523523}
    524524
     525/**
     526 * Redirect to the About WordPress page after a successful upgrade.
     527 *
     528 * This is a temporary function for the 3.3 upgrade only and will be removed in a later version.
     529 *
     530 * @since 3.3.0
     531 *
     532 */
     533function _redirect_to_about_wordpress() {
     534    // Only for WP version < 3.3.0
     535    if ( version_compare( $GLOBALS['wp_version'], '3.3.0', '>' ) )
     536        return;
    525537?>
     538<script type="text/javascript">
     539window.location = '<?php echo admin_url( 'about.php?upgraded' ); ?>';
     540</script>
     541<?php
     542}
     543
     544add_action( 'admin_footer-update-core.php', '_redirect_to_about_wordpress' );
     545?>
Note: See TracChangeset for help on using the changeset viewer.