Fires the activation routine for a new site created in a multisite installation.


do_action( 'bp_new_site', (int) $blog_id, (int) $user_id, (string) $domain, (string) $path, (int) $site_id, (array) $meta ); 

Parameters (6)

0. $blog_id (int)
ID of the blog being installed to.
1. $user_id (int)
ID of the user the install is for.
2. $domain (string)
Domain to use with the install.
3. $path (string)
Path to use with the install.
4. $site_id (int)
ID of the site being installed to.
5. $meta (array)
Metadata to use with the site creation.


To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'bp_new_site', $blog_id, $user_id, $domain, $path, $site_id, $meta ); 
The following example is for adding a hook callback.
  1. // define the bp_new_site callback 
  2. function action_bp_new_site( $blog_id, $user_id, $domain, $path, $site_id, $meta ) { 
  3. // make action magic happen here... 
  4. }; 
  6. // add the action 
  7. add_action( 'bp_new_site', 'action_bp_new_site', 10, 6 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'bp_new_site', 'action_bp_new_site', 10, 6 ); 

Defined (1)

The action is defined in the following location(s).

  1. do_action( 'bp_new_site', $blog_id, $user_id, $domain, $path, $site_id, $meta );