[wp-hackers] Action Hook Upon Blog/Site Creation in Multisite
Matthias Breuer
mail at matthiasbreuer.com
Thu Apr 18 20:01:05 UTC 2013
Hello Mark,
I am pretty sure the action 'wpmu_new_blog' is what you are looking for. This is what the docstring for the function 'wpmu_create_blog' says:
* This function runs when a user self-registers a new site as well
* as when a Super Admin creates a new site. Hook to 'wpmu_new_blog'
* for events that should affect all new sites.
The action is called with the following parameters:
do_action( 'wpmu_new_blog', $blog_id, $user_id, $domain, $path, $site_id, $meta );
I often use http://adambrown.info/p/wp_hooks to find hooks that are not in the codex.
Best,
Matthias
Am 18.04.2013 um 21:44 schrieb Mark Smith <cloudpresshosting at gmail.com>:
> I have WordPress setup as a multisite. I am looking for a hook that fires
> right after the creation of a new blog/site and I can get the blog_id for
> the newly created blog from. I could not find any hook that looked like it
> would do this in the action hook reference of the codex but I know that's
> not a complete list. So I was curious if anyone here knew about such a hook.
>
> Thanks.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list