bb_user_search_form_roles

The BuddyPress bb user search form roles hook.

Description

apply_filters( 'bb_user_search_form_roles', (string) $wp_roles_get_names ); 

Parameters (1)

0. $wp_roles_get_names (string)
The wp roles get names.

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-admin/includes/functions.bb-admin.php  
  1. $roles = apply_filters( 'bb_user_search_form_roles', $wp_roles->get_names() );