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

Wordpress Plugin #9

Open
abecoffman opened this issue Sep 24, 2017 · 7 comments
Open

Wordpress Plugin #9

abecoffman opened this issue Sep 24, 2017 · 7 comments
Assignees

Comments

@abecoffman
Copy link

Hi There,

Would you be interested in turning this into a Wordpress Plugin for generating a custom default avatar for comments? I would be very keen to use something like that. The idea would be to use their gravatar by default, but if they didn't have one, then fall back to this library to generate an image with their initials and a random color. You've done all the hard work so turning into a plugin would be pretty straightforward.

Cheers
Abe

@LasseRafn
Copy link
Owner

Hi!

Could be quite cool! Absolutely.
Where are these avatars be displayed? I’m not much into Wordpress 😬

Cheers

@LasseRafn
Copy link
Owner

Would you happen to have any idea how to modify profile pictures with code in Wordpress?

@abecoffman
Copy link
Author

So the best way to do it would be to use a filter on the get_avatar() function. More info can be found here:
https://codex.wordpress.org/Plugin_API/Filter_Reference/get_avatar

This plugin does something similar, but not as well.
https://github.com/Dev49net/wp-first-letter-avatar

@LasseRafn
Copy link
Owner

LasseRafn commented Sep 25, 2017

Great, seems pretty straightforward! I will setup a plugin very soon 👍

I will be creating a tiny web API for this package first (it's ready, I just need to publish it), which can also act as an optional fallback for Wordpress users using a hosting provider that does not support required extensions.

API: https://github.com/LasseRafn/ui-avatars
Plugin source coming here: https://github.com/LasseRafn/wordpress-initials-avatar

@LasseRafn LasseRafn self-assigned this Sep 25, 2017
@abecoffman
Copy link
Author

👍

@LasseRafn
Copy link
Owner

I've submitted a v0.5 for review at Wordpress 👍

@LasseRafn
Copy link
Owner

This one will use the public api that I released recently, but I am already working on one that generates the avatars on-server. I just had some issues with generating a url for the avatar when using on-server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants