I am currently developing a multi-site plug-in for WordPress. I need to run a function when a new site is created.
2 Answers
I guess you are looking for an action/filter.
wpmu_new_blog
this action is fired in wpmu_create_blog
function (wp-includes/ms-functions.php)
do_action( 'wpmu_new_blog', $blog_id, $user_id, $domain, $path, $site_id, $meta );