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 Description


Parameters Parameters

$blog_id

(Required)

$user_id

(Required)

$domain

(Required)

$path

(Required)

$site_id

(Required)

$meta

(Required)


Top ↑

Source Source

File: includes/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 site
	bbp_switch_to_site( $blog_id );

	// Do the bbPress activation routine
	do_action( 'bbp_new_site', $blog_id, $user_id, $domain, $path, $site_id, $meta );

	// Restore original site
	bbp_restore_current_site();
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.