single_site_activation(); restore_current_blog(); } /** * Make default UM installation at the new blog if UM is active for network * works since 5.1 WP version * * @param \WP_Site $blog */ function create_new_blog( $blog ) { switch_to_blog( $blog->blog_id ); UM()->single_site_activation(); restore_current_blog(); } } }