diff --git src/bp-core/bp-core-avatars.php src/bp-core/bp-core-avatars.php
index c606a34..ca36325 100644
|
|
|
function bp_avatar_ajax_set() {
|
| 1354 | 1354 | * @param string $type Inform about the way the avatar was set ('crop') |
| 1355 | 1355 | */ |
| 1356 | 1356 | do_action( 'xprofile_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'] ); |
| | 1357 | } elseif ( 'group' === $avatar_data['object'] ) { |
| | 1358 | /** This action is documented in bp-groups/bp-groups-screens.php */ |
| | 1359 | do_action( 'groups_avatar_uploaded', (int) $avatar_data['item_id'], $atavar_data['type'] ); |
| 1357 | 1360 | } |
| 1358 | 1361 | |
| 1359 | 1362 | wp_send_json_success( $return ); |
diff --git src/bp-groups/bp-groups-screens.php src/bp-groups/bp-groups-screens.php
index 46b654f..0ec6abc 100644
|
|
|
function groups_screen_group_admin_avatar() {
|
| 1065 | 1065 | if ( !bp_core_avatar_handle_crop( $args ) ) { |
| 1066 | 1066 | bp_core_add_message( __( 'There was a problem cropping the group profile photo.', 'buddypress' ), 'error' ); |
| 1067 | 1067 | } 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 | */ |
| | 1076 | do_action( 'groups_avatar_uploaded', bp_get_current_group_id(), 'crop' ); |
| | 1077 | |
| 1068 | 1078 | bp_core_add_message( __( 'The new group profile photo was uploaded successfully.', 'buddypress' ) ); |
| 1069 | 1079 | } |
| 1070 | 1080 | } |