xprofile_new_avatar_action

The BuddyPress cover xprofile new avatar action hook.

Description

apply_filters( 'xprofile_new_avatar_action', $sprintf, (unknown) $user_id ); 

Parameters (2)

0. $sprintf
The sprintf.
1. $user_id (unknown)
The user id.

Usage

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

Defined (1)

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

/bp-cover.php  
  1. 'action' => apply_filters( 'xprofile_new_avatar_action', sprintf( __( '%s uploaded a new profile picture', 'buddypress' ), $userlink ), $user_id ),