diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php
index 620e9c9194..6e0aaf30e7 100644
a
|
b
|
function wpmu_create_user( $user_name, $password, $email ) { |
1280 | 1280 | * root domain (eg 'blog1.example.com'), and $path is '/'. |
1281 | 1281 | * |
1282 | 1282 | * @since MU (3.0.0) |
| 1283 | * @since 5.2.0 |
1283 | 1284 | * |
1284 | 1285 | * @param string $domain The new site's domain. |
1285 | 1286 | * @param string $path The new site's path. |
… |
… |
function wpmu_create_user( $user_name, $password, $email ) { |
1291 | 1292 | * updated. Otherwise, keys and values will be used to set options for |
1292 | 1293 | * the new site. Default empty array. |
1293 | 1294 | * @param int $network_id Optional. Network ID. Only relevant on multi-network installations. |
| 1295 | * @param array $metas Optional. Array of key=>value pairs used to set intial blogmeta. |
| 1296 | * Default: empty array. |
1294 | 1297 | * @return int|WP_Error Returns WP_Error object on failure, the new site ID on success. |
1295 | 1298 | */ |
1296 | | function wpmu_create_blog( $domain, $path, $title, $user_id, $options = array(), $network_id = 1 ) { |
| 1299 | function wpmu_create_blog( $domain, $path, $title, $user_id, $options = array(), $network_id = 1, $metas = array() ) { |
1297 | 1300 | $defaults = array( |
1298 | 1301 | 'public' => 0, |
1299 | 1302 | ); |
… |
… |
function wpmu_create_blog( $domain, $path, $title, $user_id, $options = array(), |
1327 | 1330 | 'title' => $title, |
1328 | 1331 | 'user_id' => $user_id, |
1329 | 1332 | 'options' => array_diff_key( $options, array_flip( $site_data_whitelist ) ), |
| 1333 | 'meta' => $metas, |
1330 | 1334 | ); |
1331 | 1335 | |
1332 | 1336 | $blog_id = wp_insert_site( array_merge( $site_data, $site_initialization_data ) ); |