strangerstudios / basic-user-avatars

Add an avatar upload field on frontend pages and on the Edit Profile screen so users and admins can manage custom profile pictures without Gravatar.
https://wordpress.org/plugins/basic-user-avatars/
39 stars 34 forks source link

Switching filter to use get_avatar_data hook. #47

Closed kimcoleman closed 3 years ago

kimcoleman commented 3 years ago

This PR switches our filter from using the get_avatar hook use an earlier hook (get_avatar_data) to filter the URL of the avatar file. This way, both get_avatar and get_avatar_url can reliably be used to get the user's local avatar through Basic User Avatars.

I kept the filter on get_avatar only to preserve the filter we offer (basic_user_avatar) in case this was being used by anyone.

Resolves https://github.com/strangerstudios/Basic-User-Avatars/issues/13