bp_get_member_types

Filters the array of member type objects.

Description

apply_filters( 'bp_get_member_types', (array) $types, (array) $args, (string) $operator ); 

This filter is run before the $output filter has been applied, so that filtering functions have access to the entire member type objects.

Parameters (3)

0. $types (array)
Member type objects, keyed by name.
1. $args (array)
Array of key=>value arguments for filtering.
2. $operator (string)
'or' to match any of $args, and to require all.

Usage

To run the hook, copy the example below.
  1. $types = apply_filters( 'bp_get_member_types', $types, $args, $operator ); 
  2.  
  3. if ( !empty( $types ) ) { 
  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_member_types callback 
  2. function filter_bp_get_member_types( $types, $args, $operator ) { 
  3. // make filter magic happen here... 
  4. return $types
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_get_member_types', 'filter_bp_get_member_types', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_get_member_types', 'filter_bp_get_member_types', 10, 3 ); 

Defined (1)

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

/bp-members/bp-members-functions.php  
  1. $types = apply_filters( 'bp_get_member_types', $types, $args, $operator );