bp_core_gravatar_email

Filters the Gravatar email to use.

Description

apply_filters( 'bp_core_gravatar_email', (string) $params_email, (string) $params_item_id, (string) $params_object ); 

Parameters (3)

0. $params_email (string)
Email to use in Gravatar request.
1. $params_item_id (string)
ID of the item being requested.
2. $params_object (string)
Object type being requested.

Usage

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

Defined (1)

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

/bp-core/bp-core-avatars.php  
  1. $params['email'] = apply_filters( 'bp_core_gravatar_email', $params['email'], $params['item_id'], $params['object'] );