Make WordPress Core

Opened 8 years ago

Last modified 8 years ago

#37899 new enhancement

Make Profile Picture Section of Edit User Admin Page Filterable

Reported by: kelderic's profile Kelderic Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7
Component: Users Keywords:
Focuses: administration Cc:

Description

Currently the Edit User page contains a section under the Biography showing the user's Profile Picture (avatar). This picture isn't editable, because WordPress uses Gravatar.

This behavior isn't typical. More commonly, websites with self-created user accounts also allow the user to upload a custom profile picture. There are a number of plugins which implement this behavior:

https://wordpress.org/plugins/custom-user-profile-photo/
https://wordpress.org/plugins/metronet-profile-picture/
https://wordpress.org/plugins/wp-user-avatar/
https://wordpress.org/plugins/basic-user-avatars/
https://wordpress.org/plugins/simple-local-avatars/

They all share a problem though, which is that they can't touch the native Profile Picture section. They all add their own HTML elsewhere on the page. This results in an Edit User page with two Profile Picture sections. CSS can hide the native non-editable section, but that's not ideal.

I'd like to propose that we make the native profile section filterable, so that plugins can override it to enhance it directly rather than adding another section to the page.

If we move the hard-coded HTML of that section into a function call that is filterable, plugins could just enhance the native section itself. This would prevent multiple Profile Picture sections and keep everything in the native location on the page.

Alternatively and less ideally, just adding a do_action() call at the end of the native Profile Picture section would at least allow for the new controls to be added in the correct location on the page.

Change History (2)

#1 @SergeyBiryukov
8 years ago

  • Component changed from Administration to Users

Related: #35868

#2 @swissspidy
8 years ago

In WordPress 4.4 a user_profile_picture_description filter was added which can be used to print whatever you want. The get_avatar() call is filterable as well. So the output is already completely customizable.

Note: See TracTickets for help on using tickets.