Admin File3
Admin File3

Reputation: 117

WPMU create weblog in php code not work

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' , '[email protected]', '');
    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 , '');

Upvotes: 0

Views: 370

Answers (1)

Related Questions