bp_active_components

Filters the array of available components.

Description

apply_filters( 'bp_active_components', (unknown) $active_components ); 

Parameters (1)

0. $active_components (unknown)
The active components.

Usage

To run the hook, copy the example below.
  1. $active_components = apply_filters( 'bp_active_components', $active_components ); 
  2.  
  3. if ( !empty( $active_components ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bp_active_components callback 
  2. function filter_bp_active_components( $active_components ) { 
  3. // make filter magic happen here... 
  4. return $active_components
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_active_components', 'filter_bp_active_components', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_active_components', 'filter_bp_active_components', 10, 1 ); 

Defined (5)

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

/bp-core/classes/class-bp-core.php  
  1. $bp->active_components = apply_filters( 'bp_active_components', $active_components ); 
  1. $bp->active_components = apply_filters( 'bp_active_components', $bp->active_components ); 
  1. $bp->active_components = apply_filters( 'bp_active_components', $bp->active_components ); 
/bp-core/admin/bp-core-admin-schema.php  
  1. $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) ); 
/bp-core/admin/bp-core-admin-components.php  
  1. $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) );