$siteurl_scheme = 'http';
if ( !
is_subdomain_install() ) { if ( 'https' ===
parse_url( get_home_url( $network->site_id
), PHP_URL_SCHEME
) ) { $home_scheme = 'https';
} if ( 'https' ===
parse_url( get_network_option( $network->id, 'siteurl'
), PHP_URL_SCHEME
) ) { $siteurl_scheme = 'https';
} } // Populate the site's options.
populate_options( array_merge( array
( 'home' =>
untrailingslashit( $home_scheme . '://' .
$site->domain .
$site->path
),
'siteurl' =>
untrailingslashit( $siteurl_scheme . '://' .
$site->domain .
$site->path
),
'blogname' =>
wp_unslash( $args['title'
] ),
'admin_email' => '',
'upload_path' =>
get_network_option( $network->id, 'ms_files_rewriting'
) ? UPLOADBLOGSDIR . "/{
$site->id
}/files" :
get_blog_option( $network->site_id, 'upload_path'
),
'blog_public' =>
(int) $site->public,
'WPLANG' =>
get_network_option( $network->id, 'WPLANG'
),
),
$args['options'
] )