WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/26/2016 06:38:32 PM (3 years ago)
Author:
ocean90
Message:

Multisite: Allow to set the site language of a new site to English.

An empty string in WPLANG is used to define the site language as en_US. The ! empty() check didn't catch this case so that wpmu_create_blog() fell back to the network setting.

Fixes #36918.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-functions.php

    r38636 r38655  
    10931093 */
    10941094function wpmu_create_blog( $domain, $path, $title, $user_id, $meta = array(), $site_id = 1 ) {
    1095     $defaults = array( 'public' => 0 );
     1095    $defaults = array(
     1096        'public' => 0,
     1097        'WPLANG' => get_site_option( 'WPLANG' ),
     1098    );
    10961099    $meta = wp_parse_args( $meta, $defaults );
    10971100
     
    11311134    }
    11321135
    1133     add_option( 'WPLANG', get_site_option( 'WPLANG' ) );
    11341136    update_option( 'blog_public', (int) $meta['public'] );
    11351137
Note: See TracChangeset for help on using the changeset viewer.