Changeset 25127 for trunk/src/wp-includes/ms-functions.php
- Timestamp:
- 08/26/2013 06:56:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-functions.php
r25113 r25127 937 937 * @return mixed Returns WP_Error object on failure, int $blog_id on success 938 938 */ 939 function wpmu_create_blog($domain, $path, $title, $user_id, $meta = '', $site_id = 1) { 939 function wpmu_create_blog( $domain, $path, $title, $user_id, $meta = '', $site_id = 1 ) { 940 $defaults = array( 'public' => 0 ); 941 $meta = wp_parse_args( $meta, $defaults ); 942 940 943 $domain = preg_replace( '/\s+/', '', sanitize_user( $domain, true ) ); 941 944 … … 965 968 add_user_to_blog($blog_id, $user_id, 'administrator'); 966 969 967 if ( is_array($meta) ) foreach ($meta as $key => $value) {968 if ( $key == 'public' || $key == 'archived' || $key == 'mature' || $key == 'spam' || $key == 'deleted' || $key == 'lang_id')970 foreach ( $meta as $key => $value ) { 971 if ( in_array( $key, array( 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' ) ) ) 969 972 update_blog_status( $blog_id, $key, $value ); 970 973 else … … 973 976 974 977 add_option( 'WPLANG', get_site_option( 'WPLANG' ) ); 975 update_option( 'blog_public', (int) $meta['public'] );978 update_option( 'blog_public', (int) $meta['public'] ); 976 979 977 980 if ( ! is_super_admin( $user_id ) && ! get_user_meta( $user_id, 'primary_blog', true ) )
Note: See TracChangeset
for help on using the changeset viewer.