bp_core_install

Main installer.

Description

bp_core_install( (bool) $active_components = false ); 

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 (1)

0. $active_components — Optional. (bool) => false
The active components.

Usage

  1. if ( !function_exists( 'bp_core_install' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/admin/bp-core-admin-schema.php'; 
  3.  
  4. // The active components. 
  5. $active_components = false; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_core_install($active_components); 
  9.  

Defined (1)

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

/bp-core/admin/bp-core-admin-schema.php  
  1. function bp_core_install( $active_components = false ) { 
  2.  
  3.  
  4. // If no components passed, get all the active components from the main site. 
  5. if ( empty( $active_components ) ) { 
  6.  
  7. /** This filter is documented in bp-core/admin/bp-core-admin-components.php */ 
  8. $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) ); 
  9.  
  10. // Install Activity Streams even when inactive (to store last_activity data). 
  11.  
  12. // Install the signups table. 
  13.  
  14. // Notifications. 
  15. if ( !empty( $active_components['notifications'] ) ) { 
  16.  
  17. // Friend Connections. 
  18. if ( !empty( $active_components['friends'] ) ) { 
  19.  
  20. // Extensible Groups. 
  21. if ( !empty( $active_components['groups'] ) ) { 
  22.  
  23. // Private Messaging. 
  24. if ( !empty( $active_components['messages'] ) ) { 
  25.  
  26. // Extended Profiles. 
  27. if ( !empty( $active_components['xprofile'] ) ) { 
  28.  
  29. // Blog tracking. 
  30. if ( !empty( $active_components['blogs'] ) ) {