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

git-svn-id: https://develop.svn.wordpress.org/trunk@19442 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-11-23 23:38:36 +00:00
parent 16e113586a
commit a877663cf9
2 changed files with 24 additions and 2 deletions

View File

@ -161,8 +161,10 @@ include( './admin-header.php' );
</div>
<div class="return-to-dashboard">
<a href="<?php echo admin_url( 'update-core.php' ); ?>"><?php _e( 'Return to Dashboard &rarr; Updates' ); ?></a> |
<a href="<?php echo admin_url(); ?>"><?php _e( 'Go to Dashboard &rarr; Home' ); ?></a>
<?php if ( current_user_can( 'update_core' ) && isset( $_GET['upgraded'] ) ) : ?>
<a href="<?php echo esc_url( admin_url( 'update-core.php' ) ); ?>"><?php _e( 'Return to Dashboard &rarr; Updates' ); ?></a> |
<?php endif; ?>
<a href="<?php echo esc_url( admin_url() ); ?>"><?php _e( 'Go to Dashboard &rarr; Home' ); ?></a>
</div>
</div>

View File

@ -522,4 +522,24 @@ function _copy_dir($from, $to, $skip_list = array() ) {
return true;
}
/**
* Redirect to the About WordPress page after a successful upgrade.
*
* This is a temporary function for the 3.3 upgrade only and will be removed in a later version.
*
* @since 3.3.0
*
*/
function _redirect_to_about_wordpress() {
// Only for WP version < 3.3.0
if ( version_compare( $GLOBALS['wp_version'], '3.3.0', '>' ) )
return;
?>
<script type="text/javascript">
window.location = '<?php echo admin_url( 'about.php?upgraded' ); ?>';
</script>
<?php
}
add_action( 'admin_footer-update-core.php', '_redirect_to_about_wordpress' );
?>