Ticket #7371: 7371-2.patch
File 7371-2.patch, 2.4 KB (added by , 8 years ago) |
---|
-
bp-core/bp-core-avatars.php
1353 1353 * @param string $item_id Inform about the user id the avatar was set for 1354 1354 * @param string $type Inform about the way the avatar was set ('crop') 1355 1355 */ 1356 do_action( 'xprofile_avatar_uploaded', (int) $avatar_data['item_id'], $avatar_data['type'] ); 1356 do_action( 'xprofile_avatar_uploaded', $avatar_data ); 1357 } elseif ( 'group' === $avatar_data['object'] ) { 1358 /** This action is documented in bp-groups/bp-groups-screens.php */ 1359 do_action( 'xgroup_avatar_uploaded', $avatar_data ); 1357 1360 } 1358 1361 1359 1362 wp_send_json_success( $return ); -
bp-groups/bp-groups-screens.php
1059 1059 'crop_x' => $_POST['x'], 1060 1060 'crop_y' => $_POST['y'], 1061 1061 'crop_w' => $_POST['w'], 1062 'crop_h' => $_POST['h'] 1062 'crop_h' => $_POST['h'], 1063 'type' => $_POST['type'] 1063 1064 ); 1064 1065 1065 1066 if ( !bp_core_avatar_handle_crop( $args ) ) { 1066 1067 bp_core_add_message( __( 'There was a problem cropping the group profile photo.', 'buddypress' ), 'error' ); 1067 1068 } else { 1069 /** 1070 * Fires after a group avatar is uploaded. 1071 * 1072 * @since 2.8.0 1073 * 1074 * @param int $group_id ID of the group. 1075 * @param string $type Avatar type. 'crop' or 'full'. 1076 */ 1077 do_action( 'xgroup_avatar_uploaded', bp_get_current_group_id(), 'crop' ); 1068 1078 bp_core_add_message( __( 'The new group profile photo was uploaded successfully.', 'buddypress' ) ); 1069 1079 } 1070 1080 } -
bp-xprofile/bp-xprofile-activity.php
206 206 * @param int $user_id The user id the avatar was set for. 207 207 * @return bool 208 208 */ 209 function bp_xprofile_new_avatar_activity( $ user_id = 0) {209 function bp_xprofile_new_avatar_activity( $avatar_data = array() ) { 210 210 211 $user_id = ( isset( $avatar_data['item_id'] ) && ! empty( $avatar_data['item_id'] ) ) ? (int) $avatar_data['item_id'] : 0; 212 211 213 // Bail if activity component is not active. 212 214 if ( ! bp_is_active( 'activity' ) ) { 213 215 return false;