WordPress.org

Make WordPress Core

Changeset 19529


Ignore:
Timestamp:
12/01/2011 05:03:11 AM (6 years ago)
Author:
nacin
Message:

Push logic into _redirect_to_about_wordpress() and be more specific about which context this runs under. see #18467.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/update-core.php

    r19527 r19529  
    537537 */
    538538function _redirect_to_about_wordpress( $wp_version ) {
     539    global $wp_version, $pagenow, $action;
     540
     541    if ( version_compare( $wp_version, '3.3', '>=' ) )
     542        return;
     543
     544    // Ensure we only run this on the update-core.php page. wp_update_core() could be called in other contexts.
     545    if ( 'update-core.php' != $pagenow )
     546        return;
     547
     548    if ( 'do-core-upgrade' != $action && 'do-core-reinstall' != $action )
     549        return;
     550 
    539551    // Load the updated default text localization domain for new strings
    540552    load_default_textdomain();
     
    555567    exit();
    556568}
    557 if ( version_compare( $GLOBALS['wp_version'], '3.3', '<' ) && 'update-core.php' == $GLOBALS['pagenow'] )
    558     add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' );
     569add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' );
Note: See TracChangeset for help on using the changeset viewer.