I want to make a new blog in php code.
Blog is created, but is disabled or not available.
I've even set options but still not active blog.
No example of how to create a blog by WPMU found on the Internet
my code:
function createweblog($domain, $path, $title, $user_id, $meta){
$id= wpmu_create_blog($domain, $path, $title, $user_id, '');
if($id > 1)
{
wpmu_signup_blog($domain, $path, $title, 'adminuser' , 'adminemail@gmail.com', '');
update_blog_option ($id,'blogdescription', 'description of new blog');
update_blog_option ($id, 'blog_public', 1);
return $id;
}
}
$blog_id = createweblog('subdomain.', 'domain.com', 'title of new blog' , 1 , '');