protected function _createObject( $args ) {
		global $wpdb;

		$meta = isset( $args['meta'] ) ? $args['meta'] : array();
		$user_id = isset( $args['user_id'] ) ? $args['user_id'] : get_current_user_id();

		// temp tables will trigger db errors when we attempt to reference them as new temp tables
		$suppress = $wpdb->suppress_errors();
		$blog = wpmu_create_blog( $args['domain'], $args['path'], $args['title'], $user_id, $meta, $args['site_id'] );
		$wpdb->suppress_errors( $suppress );

		if ( $blog && ! is_wp_error( $blog ) ) {
			$this->_debug( 'Generated blog ID: ' . $blog );
		} elseif ( is_wp_error( $blog ) ) {
			$this->_debug(
				'Blog generation failed with message [%s] %s',
				$blog->get_error_code(),
				$blog->get_error_messages()
			);
		} else {
			$this->_debug( 'Blog generation failed' );
		}

		return $blog;
	}
protected function _createObject( $args ) {
		global $wpdb;

		$meta = isset( $args['meta'] ) ? $args['meta'] : array();
		$user_id = isset( $args['user_id'] ) ? $args['user_id'] : get_current_user_id();

		// temp tables will trigger db errors when we attempt to reference them as new temp tables
		$suppress = $wpdb->suppress_errors();
		$blog = wpmu_create_blog( $args['domain'], $args['path'], $args['title'], $user_id, $meta, $args['site_id'] );
		$wpdb->suppress_errors( $suppress );

		if ( $blog && ! is_wp_error( $blog ) ) {
			$this->_debug( 'Generated blog ID: ' . $blog );
		} elseif ( is_wp_error( $blog ) ) {
			$this->_debug(
				'Blog generation failed with message [%s] %s',
				$blog->get_error_code(),
				$blog->get_error_messages()
			);
		} else {
			$this->_debug( 'Blog generation failed' );
		}

		return $blog;
	}
protected function _createObject ( $ args ) { global $ wpdb ; $ meta = isset ( $ args [ 'meta' ] ) ? $ args [ 'meta' ] : array ( ) ; $ user_id = isset ( $ args [ 'user_id' ] ) ? $ args [ 'user_id' ] : get_current_user_id ( ) ; // temp tables will trigger db errors when we attempt to reference them as new temp tables $ suppress = $ wpdb -> suppress_errors ( ) ; $ blog = wpmu_create_blog ( $ args [ 'domain' ] , $ args [ 'path' ] , $ args [ 'title' ] , $ user_id , $ meta , $ args [ 'site_id' ] ) ; $ wpdb -> suppress_errors ( $ suppress ) ; if ( $ blog && ! is_wp_error ( $ blog ) ) { $ this -> _debug ( 'Generated blog ID: ' . $ blog ) ; } elseif ( is_wp_error ( $ blog ) ) { $ this -> _debug ( 'Blog generation failed with message [%s] %s' , $ blog -> get_error_code ( ) , $ blog -> get_error_messages ( ) ) ; } else { $ this -> _debug ( 'Blog generation failed' ) ; } return $ blog ; }
Generates a new blog.

@since 1.0.0

@access protected
@global \wpdb $wpdb The database connection.
@param array $args The array of arguments to use during a new blog creation.
@return int|\WP_Error The newly created blog's ID on success, otherwise a WP_Error object.
Generates a new blog .