bp_deactivated_components
Filters the deactivated components.
Description
Parameters (1)
- 0. $array (array) =>
array_values( array_diff( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), array_keys( $bp->active_components ) ) )
- Array of deactivated components.
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 'bp_deactivated_components', $array );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_deactivated_components callback
- function filter_bp_deactivated_components( $array ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 'bp_deactivated_components', 'filter_bp_deactivated_components', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_deactivated_components', 'filter_bp_deactivated_components', 10, 1 );
Defined (2)
The filter is defined in the following location(s).
- /bp-core/classes/class-bp-core.php
- $bp->deactivated_components = apply_filters( 'bp_deactivated_components', array_values( array_diff( array_values( array_merge( $bp->optional_components, $bp->required_components ) ), array_keys( $bp->active_components ) ) ) );
- $bp->deactivated_components = apply_filters( 'bp_deactivated_components', $trimmed );