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

git-svn-id: http://svn.automattic.com/wordpress/trunk@19442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-11-23 23:38:36 +00:00
parent 470a2bb683
commit fd676baa81
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' );
?>