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

props jeremyfelt.
fixes #25158.
Built from https://develop.svn.wordpress.org/trunk@26120


git-svn-id: http://core.svn.wordpress.org/trunk@26032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2013-11-13 03:23:10 +00:00
parent fdc8f7dcff
commit 74f77b85a6
16 changed files with 54 additions and 58 deletions

View File

@@ -100,8 +100,8 @@ if ( !function_exists('wp_install_defaults') ) :
*
* @param int $user_id User ID.
*/
function wp_install_defaults($user_id) {
global $wpdb, $wp_rewrite, $current_site, $table_prefix;
function wp_install_defaults( $user_id ) {
global $wpdb, $wp_rewrite, $table_prefix;
// Default category
$cat_name = __('Uncategorized');
@@ -135,7 +135,7 @@ function wp_install_defaults($user_id) {
$first_post = __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' );
$first_post = str_replace( "SITE_URL", esc_url( network_home_url() ), $first_post );
$first_post = str_replace( "SITE_NAME", $current_site->site_name, $first_post );
$first_post = str_replace( "SITE_NAME", get_current_site()->site_name, $first_post );
} else {
$first_post = __('Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!');
}