xprofile_avatar_uploaded

  • do_action( 'xprofile_avatar_uploaded' )

    Source Reference:

    • Component: BuddyPress:: bp-xprofile
      File: /bp-xprofile/bp-xprofile-screens.php :: Trac Source Line: 168
      	if ( isset( $_POST['avatar-crop-submit'] ) ) {
      
      		// Check the nonce
      		check_admin_referer( 'bp_avatar_cropstore' );
      
      		if ( !bp_core_avatar_handle_crop( array( 'item_id' => $bp->displayed_user->id, 'original_file' => $_POST['image_src'], 'crop_x' => $_POST['x'], 'crop_y' => $_POST['y'], 'crop_w' => $_POST['w'], 'crop_h' => $_POST['h'] ) ) )
      			bp_core_add_message( __( 'There was a problem cropping your avatar, please try uploading it again', 'buddypress' ), 'error' );
      		else {
      			bp_core_add_message( __( 'Your new avatar was uploaded successfully!', 'buddypress' ) );
      

Hook: add_action: xprofile_avatar_uploaded instances (1)

  • add_action( 'xprofile_avatar_uploaded', 'bp_xprofile_new_avatar_activity' )
    $function_to_add: bp_xprofile_new_avatar_activity
    $priority: 0
    $accepted_args: 0

    Source Reference:

Comments are closed.