388 /* |
388 /* |
389 * translators: default GMT offset or timezone string. Must be either a valid offset (-12 to 14) |
389 * translators: default GMT offset or timezone string. Must be either a valid offset (-12 to 14) |
390 * or a valid timezone string (America/New_York). See https://www.php.net/manual/en/timezones.php |
390 * or a valid timezone string (America/New_York). See https://www.php.net/manual/en/timezones.php |
391 * for all timezone strings supported by PHP. |
391 * for all timezone strings supported by PHP. |
392 */ |
392 */ |
393 $offset_or_tz = _x( '0', 'default GMT offset or timezone string' ); // phpcs:ignore WordPress.WP.I18n.NoEmptyStrings |
393 $offset_or_tz = _x( '0', 'default GMT offset or timezone string' ); |
394 if ( is_numeric( $offset_or_tz ) ) { |
394 if ( is_numeric( $offset_or_tz ) ) { |
395 $gmt_offset = $offset_or_tz; |
395 $gmt_offset = $offset_or_tz; |
396 } elseif ( $offset_or_tz && in_array( $offset_or_tz, timezone_identifiers_list(), true ) ) { |
396 } elseif ( $offset_or_tz && in_array( $offset_or_tz, timezone_identifiers_list(), true ) ) { |
397 $timezone_string = $offset_or_tz; |
397 $timezone_string = $offset_or_tz; |
398 } |
398 } |
962 * @global wpdb $wpdb WordPress database abstraction object. |
962 * @global wpdb $wpdb WordPress database abstraction object. |
963 * @global object $current_site |
963 * @global object $current_site |
964 * @global WP_Rewrite $wp_rewrite WordPress rewrite component. |
964 * @global WP_Rewrite $wp_rewrite WordPress rewrite component. |
965 * |
965 * |
966 * @param int $network_id ID of network to populate. |
966 * @param int $network_id ID of network to populate. |
967 * @param string $domain The domain name for the network (eg. "example.com"). |
967 * @param string $domain The domain name for the network. Example: "example.com". |
968 * @param string $email Email address for the network administrator. |
968 * @param string $email Email address for the network administrator. |
969 * @param string $site_name The name of the network. |
969 * @param string $site_name The name of the network. |
970 * @param string $path Optional. The path to append to the network's domain name. Default '/'. |
970 * @param string $path Optional. The path to append to the network's domain name. Default '/'. |
971 * @param bool $subdomain_install Optional. Whether the network is a subdomain installation or a subdirectory installation. |
971 * @param bool $subdomain_install Optional. Whether the network is a subdomain installation or a subdirectory installation. |
972 * Default false, meaning the network is a subdirectory installation. |
972 * Default false, meaning the network is a subdirectory installation. |
1170 if ( function_exists( 'clean_network_cache' ) ) { |
1170 if ( function_exists( 'clean_network_cache' ) ) { |
1171 clean_network_cache( $network_id ); |
1171 clean_network_cache( $network_id ); |
1172 } else { |
1172 } else { |
1173 wp_cache_delete( $network_id, 'networks' ); |
1173 wp_cache_delete( $network_id, 'networks' ); |
1174 } |
1174 } |
1175 |
|
1176 wp_cache_delete( 'networks_have_paths', 'site-options' ); |
|
1177 |
1175 |
1178 if ( ! is_multisite() ) { |
1176 if ( ! is_multisite() ) { |
1179 $site_admins = array( $site_user->user_login ); |
1177 $site_admins = array( $site_user->user_login ); |
1180 $users = get_users( |
1178 $users = get_users( |
1181 array( |
1179 array( |
1265 'add_new_users' => '0', |
1263 'add_new_users' => '0', |
1266 'upload_space_check_disabled' => is_multisite() ? get_site_option( 'upload_space_check_disabled' ) : '1', |
1264 'upload_space_check_disabled' => is_multisite() ? get_site_option( 'upload_space_check_disabled' ) : '1', |
1267 'subdomain_install' => $subdomain_install, |
1265 'subdomain_install' => $subdomain_install, |
1268 'global_terms_enabled' => global_terms_enabled() ? '1' : '0', |
1266 'global_terms_enabled' => global_terms_enabled() ? '1' : '0', |
1269 'ms_files_rewriting' => is_multisite() ? get_site_option( 'ms_files_rewriting' ) : '0', |
1267 'ms_files_rewriting' => is_multisite() ? get_site_option( 'ms_files_rewriting' ) : '0', |
|
1268 'user_count' => get_site_option( 'user_count' ), |
1270 'initial_db_version' => get_option( 'initial_db_version' ), |
1269 'initial_db_version' => get_option( 'initial_db_version' ), |
1271 'active_sitewide_plugins' => array(), |
1270 'active_sitewide_plugins' => array(), |
1272 'WPLANG' => get_locale(), |
1271 'WPLANG' => get_locale(), |
1273 ); |
1272 ); |
1274 if ( ! $subdomain_install ) { |
1273 if ( ! $subdomain_install ) { |