Push logic into _redirect_to_about_wordpress() and be more specific about which context this runs under. see #18467.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6bba5a265b
commit
3aed7560f6
|
@ -536,6 +536,18 @@ function _copy_dir($from, $to, $skip_list = array() ) {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function _redirect_to_about_wordpress( $wp_version ) {
|
function _redirect_to_about_wordpress( $wp_version ) {
|
||||||
|
global $wp_version, $pagenow, $action;
|
||||||
|
|
||||||
|
if ( version_compare( $wp_version, '3.3', '>=' ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Ensure we only run this on the update-core.php page. wp_update_core() could be called in other contexts.
|
||||||
|
if ( 'update-core.php' != $pagenow )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( 'do-core-upgrade' != $action && 'do-core-reinstall' != $action )
|
||||||
|
return;
|
||||||
|
|
||||||
// Load the updated default text localization domain for new strings
|
// Load the updated default text localization domain for new strings
|
||||||
load_default_textdomain();
|
load_default_textdomain();
|
||||||
|
|
||||||
|
@ -554,5 +566,4 @@ window.location = '<?php echo admin_url( 'about.php?updated' ); ?>';
|
||||||
include(ABSPATH . 'wp-admin/admin-footer.php');
|
include(ABSPATH . 'wp-admin/admin-footer.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ( version_compare( $GLOBALS['wp_version'], '3.3', '<' ) && 'update-core.php' == $GLOBALS['pagenow'] )
|
add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' );
|
||||||
add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' );
|
|
||||||
|
|
Loading…
Reference in New Issue