basename ) ) return; // Switch to the new blog. switch_to_blog( $blog_id ); /** * Fires the activation routine for a new site created in a multisite installation. * * @since 1.7.0 * * @param int $blog_id ID of the blog being installed to. * @param int $user_id ID of the user the install is for. * @param string $domain Domain to use with the install. * @param string $path Path to use with the install. * @param int $site_id ID of the site being installed to. * @param array $meta Metadata to use with the site creation. */ do_action( 'bp_new_site', $blog_id, $user_id, $domain, $path, $site_id, $meta ); // Restore original blog. restore_current_blog(); } /** Sub-Actions ***************************************************************/ /** * Piggy back admin_init action. * * @since 1.7.0 * */ function bp_admin_init() { /** * Fires inside the bp_admin_init function. * * @since 1.6.0 */ do_action( 'bp_admin_init' ); } /** * Piggy back admin_menu action. * * @since 1.7.0 * */ function bp_admin_menu() { /** * Fires inside the bp_admin_menu function. * * @since 1.7.0 */ do_action( 'bp_admin_menu' ); } /** * Piggy back admin_head action. * * @since 1.7.0 * */ function bp_admin_head() { /** * Fires inside the bp_admin_head function. * * @since 1.6.0 */ do_action( 'bp_admin_head' ); } /** * Piggy back admin_notices action. * * @since 1.7.0 * */ function bp_admin_notices() { /** * Fires inside the bp_admin_notices function. * * @since 1.5.0 */ do_action( 'bp_admin_notices' ); } /** * Piggy back admin_enqueue_scripts action. * * @since 1.7.0 * * @param string $hook_suffix The current admin page, passed to * 'admin_enqueue_scripts'. */ function bp_admin_enqueue_scripts( $hook_suffix = '' ) { /** * Fires inside the bp_admin_enqueue_scripts function. * * @since 1.7.0 * * @param string $hook_suffix The current admin page, passed to admin_enqueue_scripts. */ do_action( 'bp_admin_enqueue_scripts', $hook_suffix ); } /** * Dedicated action to register BuddyPress importers. * * @since 1.7.0 * */ function bp_register_importers() { /** * Fires inside the bp_register_importers function. * * Used to register a BuddyPress importer. * * @since 1.7.0 */ do_action( 'bp_register_importers' ); } /** * Dedicated action to register admin styles. * * @since 1.7.0 * */ function bp_register_admin_style() { /** * Fires inside the bp_register_admin_style function. * * @since 1.7.0 */ do_action( 'bp_register_admin_style' ); } /** * Dedicated action to register admin settings. * * @since 1.7.0 * */ function bp_register_admin_settings() { /** * Fires inside the bp_register_admin_settings function. * * @since 1.6.0 */ do_action( 'bp_register_admin_settings' ); } /** * Dedicated filter to inform about BP components directory page states. * * @since 10.0.0 * * @param string[] $post_states An array of post display states. * @param WP_Post $post The current post object. */ function bp_admin_display_directory_states( $post_states = array(), $post = null ) { /** * Filter here to add BP Directory pages. * * Used internaly by BP_Component->admin_directory_states(). Please use the dynamic * filter in BP_Component->admin_directory_states() to edit the directory state * according to the component's ID. * * @since 10.0.0 * * @param array $value An empty array. * @param WP_Post $post The current post object. */ $directory_page_states = apply_filters( 'bp_admin_display_directory_states', array(), $post ); if ( $directory_page_states ) { $post_states = array_merge( $post_states, $directory_page_states ); } return $post_states; }