Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hooks for "avatar updated" and "avatar deleted", to make SLA more "pluggable" in the WP ecosystem. #148

Closed
1 task done
t-lock opened this issue Aug 31, 2022 · 0 comments · Fixed by #149
Closed
1 task done
Assignees
Labels
type:enhancement New feature or request.
Milestone

Comments

@t-lock
Copy link
Contributor

t-lock commented Aug 31, 2022

Is your enhancement related to a problem? Please describe.

I have been using this plugin for awhile and love it's functionality. However, an issue came up recently when I was trying to share the local avatar with an outside service that sits next to Wordpress in our larger application context.

Specifically, I needed to share this avatar with the remote service whenever it changed, or when it was deleted (to clear the remote avatar back to default).

Generally, this feature is also useful for any developers who are implementing their own "edit profile" (and edit avatar) functionality outside of the Wordpress in-admin flow. Really, the use cases are enumerable. Exposing SLA's core events as hooks serves to help SLA "play nice with others".

Designs

No response

Describe alternatives you've considered

I have tried as many ways as I could think of to achieve this with existing wordpress hooks and filters surrounding profile updates and avatars. However, none of these attempts was "bulletproof". In one case, I thought I had a working solution, but Simple Local Avatar's caching functionality was causing false-positives to fire on page-load, so I was sharing the avatar with the remote on every page load.

I wish I could be more specific here on each thing that I tried, but since my final "bulletproof" solution involved forking the SLA plugin and adding these hooks, I have lost those previous attempts to the ether.

Shortly, I will submit a simple PR which adds this functionality. If accepted, documentation would need to be added as well.
EDIT: PR: #149

Code of Conduct

  • I agree to follow this project's Code of Conduct
@t-lock t-lock added the type:enhancement New feature or request. label Aug 31, 2022
@t-lock t-lock changed the title Add hooks for avatar updated and avatar deleted, to make SLA more "pluggable" in the WP ecosystem. Add hooks for "avatar updated" and "avatar deleted", to make SLA more "pluggable" in the WP ecosystem. Aug 31, 2022
@vikrampm1 vikrampm1 moved this to Incoming in Open Source Practice Aug 31, 2022
@jeffpaul jeffpaul added this to the 2.6.0 milestone Aug 31, 2022
@jeffpaul jeffpaul moved this from Incoming to In Review in Open Source Practice Aug 31, 2022
Repository owner moved this from In Review to Merged in Open Source Practice Sep 6, 2022
@vikrampm1 vikrampm1 moved this from Merged to Done/Released in Open Source Practice Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants