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:
parent
16e113586a
commit
a877663cf9
|
@ -161,8 +161,10 @@ include( './admin-header.php' );
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="return-to-dashboard">
|
<div class="return-to-dashboard">
|
||||||
<a href="<?php echo admin_url( 'update-core.php' ); ?>"><?php _e( 'Return to Dashboard → Updates' ); ?></a> |
|
<?php if ( current_user_can( 'update_core' ) && isset( $_GET['upgraded'] ) ) : ?>
|
||||||
<a href="<?php echo admin_url(); ?>"><?php _e( 'Go to Dashboard → Home' ); ?></a>
|
<a href="<?php echo esc_url( admin_url( 'update-core.php' ) ); ?>"><?php _e( 'Return to Dashboard → Updates' ); ?></a> |
|
||||||
|
<?php endif; ?>
|
||||||
|
<a href="<?php echo esc_url( admin_url() ); ?>"><?php _e( 'Go to Dashboard → Home' ); ?></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -522,4 +522,24 @@ function _copy_dir($from, $to, $skip_list = array() ) {
|
||||||
return true;
|
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' );
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue