get_avatar

This filter is documented in wp-includes/pluggable.php.

Description

apply_filters( 'get_avatar', (unknown) $avatar, (unknown) $id_or_email, (unknown) $args_size, (unknown) $args_default, (unknown) $args_alt, (unknown) $args ); 

Parameters (6)

0. $avatar (unknown)
The avatar.
1. $id_or_email (unknown)
The id or email.
2. $args_size (unknown)
The args size.
3. $args_default (unknown)
The args default.
4. $args_alt (unknown)
The args alt.
5. $args (unknown)
The args.

Usage

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

Defined (2)

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

/wp-includes/pluggable.php  
  1. return apply_filters( 'get_avatar', $avatar, $id_or_email, $args['size'], $args['default'], $args['alt'], $args ); 
  1. return apply_filters( 'get_avatar', $avatar, $id_or_email, $args['size'], $args['default'], $args['alt'], $args );