require_once('admin.php');
do_action('wpmuadminedit', '');
$domain = $_GET['domain'];
$email = $_GET['email'];
$title = $_GET['title'];
$public = 1;
//$domain = 'blog1';
//$email = '[email protected]';
//$title = 'Blog1 title';
//$public = 0;
$user_id = email_exists($email);
if( constant('VHOST') == 'yes' ) {
$newdomain = $domain.".".$current_site->domain;
$path = $base;
} else {
$newdomain = $current_site->domain;
$path = $base.$domain.'/';
}
$domain = strtolower( $domain );
$newdomain = strtolower( $newdomain );
$path = strtolower( $path );
$id = wpmu_create_blog($newdomain, $path, $title, $user_id , $public, $current_site->id);
if( get_user_option( $user_id, 'primary_blog' ) == 1 )
update_user_option( $user_id, 'primary_blog', $id, true );