xprofile_avatar_uploaded

Fires if the new avatar was successfully captured.

Description

do_action( 'xprofile_avatar_uploaded', (int) $int_args_item_id, (string) $crop ); 

Parameters (2)

0. $int_args_item_id (int) => (int) $args['item_id']
Inform about the user id the avatar was set for.
1. $crop (string) => 'crop'
Inform about the way the avatar was set ('crop').

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'xprofile_avatar_uploaded', $int_args_item_id, $crop ); 
The following example is for adding a hook callback.
  1. // define the xprofile_avatar_uploaded callback 
  2. function action_xprofile_avatar_uploaded( $int_args_item_id, $crop ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'xprofile_avatar_uploaded', 'action_xprofile_avatar_uploaded', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'xprofile_avatar_uploaded', 'action_xprofile_avatar_uploaded', 10, 2 ); 

Defined (3)

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

/bp-xprofile/bp-xprofile-screens.php  
  1. do_action( 'xprofile_avatar_uploaded', (int) $args['item_id'], 'crop' ); 
/bp-core/bp-core-avatars.php  
  1. do_action( 'xprofile_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'], $avatar_data ); 
  1. do_action( 'xprofile_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'], $r );