Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/20/2016 03:11:18 AM (8 years ago)
Author:
boonebgorges
Message:

Improve actions fired after avatar upload.

  • Introduce the groups_avatar_uploaded action, which paralells the xprofile_avatar_uploaded filter, and runs after either an AJAX or a non-AJAX group avatar upload.
  • Update instances of the xprofile_avatar_uploaded action so that they receive the array of arguments passed to the upload/crop handler.
  • Improve documentation for existing actions.

Props bhargavbhandari90.
Fixes #7371.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-screens.php

    r11146 r11314  
    10661066            bp_core_add_message( __( 'There was a problem cropping the group profile photo.', 'buddypress' ), 'error' );
    10671067        } else {
     1068            /**
     1069             * Fires after a group avatar is uploaded.
     1070             *
     1071             * @since 2.8.0
     1072             *
     1073             * @param int    $group_id ID of the group.
     1074             * @param string $type     Avatar type. 'crop' or 'full'.
     1075             * @param array  $args     Array of parameters passed to the avatar handler.
     1076             */
     1077            do_action( 'groups_avatar_uploaded', bp_get_current_group_id(), 'crop', $args );
    10681078            bp_core_add_message( __( 'The new group profile photo was uploaded successfully.', 'buddypress' ) );
    10691079        }
Note: See TracChangeset for help on using the changeset viewer.