WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/13/2013 03:22:48 AM (8 years ago)
Author:
SergeyBiryukov
Message:

Use get_current_site() instead of the $current_site global when possible.

props jeremyfelt.
fixes #25158.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r26024 r26120  
    101101 * @param int $user_id User ID.
    102102 */
    103 function wp_install_defaults($user_id) {
    104     global $wpdb, $wp_rewrite, $current_site, $table_prefix;
     103function wp_install_defaults( $user_id ) {
     104    global $wpdb, $wp_rewrite, $table_prefix;
    105105
    106106    // Default category
     
    136136
    137137        $first_post = str_replace( "SITE_URL", esc_url( network_home_url() ), $first_post );
    138         $first_post = str_replace( "SITE_NAME", $current_site->site_name, $first_post );
     138        $first_post = str_replace( "SITE_NAME", get_current_site()->site_name, $first_post );
    139139    } else {
    140140        $first_post = __('Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!');
Note: See TracChangeset for help on using the changeset viewer.