bp_core_install( array|bool $active_components = false )
Main installer.
Description
Can be passed an optional array of components to explicitly run installation routines on, typically the first time a component is activated in Settings.
Parameters
- $active_components
-
(Optional) Components to install.
Default value: false
Source
File: bp-core/admin/bp-core-admin-schema.php
function bp_core_install( $active_components = false ) { bp_pre_schema_upgrade(); // If no components passed, get all the active components from the main site. if ( empty( $active_components ) ) { /** This filter is documented in bp-core/admin/bp-core-admin-components.php */ $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) ); } // Install Activity Feeds even when inactive (to store last_activity data). bp_core_install_activity_streams(); // Install the signups table. bp_core_maybe_install_signups(); // Notifications. if ( !empty( $active_components['notifications'] ) ) { bp_core_install_notifications(); } // Connections. if ( !empty( $active_components['friends'] ) ) { bp_core_install_friends(); } // Follow. if ( !empty( $active_components['activity'] ) ) { bp_core_install_follow(); } // Extensible Groups. if ( !empty( $active_components['groups'] ) ) { bp_core_install_groups(); } // Private Messaging. if ( !empty( $active_components['messages'] ) ) { bp_core_install_private_messaging(); } // Profile Fields. if ( !empty( $active_components['xprofile'] ) ) { bp_core_install_extended_profiles(); } // Blog tracking. if ( !empty( $active_components['blogs'] ) ) { bp_core_install_blog_tracking(); } // Discussion forums if ( !empty( $active_components['forums'] ) ) { bp_core_install_discussion_forums(); } // Media if ( !empty( $active_components['media'] ) ) { bp_core_install_media(); } // Network search if ( ! empty( $active_components['search'] ) ) { bp_core_install_network_search(); } }
Changelog
Version | Description |
---|---|
BuddyPress 1.0.0 | 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.