bbp_new_site( int $blog_id, int $user_id, string $domain, string $path, int $site_id, array() $meta )
When a new site is created in a multisite installation, run the activation routine on that site
Description
Parameters
- $blog_id
-
(Required)
- $user_id
-
(Required)
- $domain
-
(Required)
- $path
-
(Required)
- $site_id
-
(Required)
- $meta
-
(Required)
Source
File: bp-forums/admin/actions.php
function bbp_new_site( $blog_id, $user_id, $domain, $path, $site_id, $meta ) { // Bail if plugin is not network activated if ( ! is_plugin_active_for_network( bbpress()->basename ) ) return; // Switch to the new blog switch_to_blog( $blog_id ); // Do the Forums activation routine do_action( 'bbp_new_site', $blog_id, $user_id, $domain, $path, $site_id, $meta ); // restore original blog restore_current_blog(); }
Changelog
Version | Description |
---|---|
bbPress (r3283) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.