Make WordPress Core


Ignore:
Timestamp:
01/06/2012 05:53:41 PM (15 years ago)
Author:
nacin
Message:

Create a network/about.php page and leverage it, to prevent the dashboard from switching to the blog admin. fixes #19762.

File:
1 edited

Legend:

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

    r19596 r19699  
    602602 * Redirect to the About WordPress page after a successful upgrade.
    603603 *
    604  * This function is only needed when the existing install is older than 3.3.0.
     604 * This function is only needed when the existing install is older than 3.3.0 (3.4.0 for multisite).
    605605 *
    606606 * @since 3.3.0
     
    610610        global $wp_version, $pagenow, $action;
    611611
    612         if ( version_compare( $wp_version, '3.3', '>=' ) )
     612        if ( is_multisite() ) {
     613                // Change to self_admin_url().
     614                if ( version_compare( $wp_version, '3.4-alpha', '>=' ) )
     615                        return;
     616        } elseif ( version_compare( $wp_version, '3.3', '>=' ) ) {
    613617                return;
     618        }
    614619
    615620        // Ensure we only run this on the update-core.php page. wp_update_core() could be called in other contexts.
     
    625630        // See do_core_upgrade()
    626631        show_message( __('WordPress updated successfully') );
    627         show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.' ), $new_version, esc_url( admin_url( 'about.php?updated' ) ) ) . '</span>' );
    628         show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $new_version, esc_url( admin_url( 'about.php?updated' ) ) ) . '</span>' );
     632        show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.' ), $new_version, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '</span>' );
     633        show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $new_version, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '</span>' );
    629634        echo '</div>';
    630635        ?>
    631636<script type="text/javascript">
    632 window.location = '<?php echo admin_url( 'about.php?updated' ); ?>';
     637window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
    633638</script>
    634639        <?php
Note: See TracChangeset for help on using the changeset viewer.