[buddypress-trac] [BuddyPress Trac] #6612: xprofile_avatar_uploaded action hook

buddypress-trac noreply at wordpress.org
Thu Sep 10 09:58:35 UTC 2015


#6612: xprofile_avatar_uploaded action hook
---------------------------+--------------------
 Reporter:  landwire       |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  2.3.4
Component:  API - Avatars  |     Version:  2.3.0
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |
---------------------------+--------------------
Changes (by imath):

 * keywords:   => has-patch
 * type:  enhancement => defect (bug)
 * version:  2.3.3 => 2.3.0
 * component:  Component - Attachments => API - Avatars
 * milestone:  Awaiting Review => 2.3.4


Comment:

 Hi landwire

 Thanks for your feedback :)

 I see. This is a bug actually. Today, using the "new way" when a user
 profile photo has been successfully cropped or set using the camera, the
 action `xprofile_screen_change_avatar` is fired, which is wrong.

 Because this action's real role is to inform the change avatar screen is
 displayed.

 In previous UI, the action used to inform the avatar has been successfully
 cropped was `xprofile_avatar_uploaded`. So i made a confusion in 2.3.0 and
 put this action too early, once the avatar was successfully uploaded but
 before it has been cropped.

 My mistake. Sorry about it. I suggest the attached patch:
 - Put the action at the right place (even if the name of this hook is
 confusing we need to keep it for backcompat reasons)
 - Add a new parameter to the action to inform about the way the avatar was
 set (crop or camera)
 - Stop using the `xprofile_screen_change_avatar`

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6612#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list