bp_get_activity_show_filters

Filters the HTML markup result for the activity filter dropdown.

Description

apply_filters( 'bp_get_activity_show_filters', (string) $output, (array) $filters, (string) $context ); 

Parameters (3)

0. $output (string)
HTML output for the activity filter dropdown.
1. $filters (array)
Array of filter options for the given context, in the following format: $option_value => $option_name.
2. $context (string)
Context for the filter. activity,, member., member_groups, group.

Usage

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

Defined (1)

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

/bp-activity/bp-activity-template.php  
  1. return apply_filters( 'bp_get_activity_show_filters', $output, $filters, $context );