[Plugin: Author Avatars List] Ignoring users with no gravatar
I’m really stuck.
Lots of my users don’t have gravatars. I would like to display only a list of users that do so that there are no default images shown.
Is there a way to do this? Thanks in advance for any help!
we don’t fetch the gravatars we just let wordpress fetch them. I can’t think how to work if the gravatar is the default.
Actually you can do that via the gravatar API 🙂
Let me look at this
We currently just call get_avatar( $id_or_email, $size = ’96’, $default = ‘<path_to_url>’ );
But I don’t think we are using a default URL so I ready this right we can replace the gravtar default with one of our choice
if so I am thing that I should add an option to select between gravtar default – transpairent – URL
Does that sound what you need?
Thanks for the replies. Paul, I’m not exactly sure what you mean. I basically need users that don’t have gravatars to be added to the $hiddenusers array.
Using the code that Ipstenu linked to, I have a way of doing this, but it has to ping the gravatar site for every user, which takes ages!
If I figure something out, I’ll let you know.
yes pinging for each user will take a longtime
What I am looking at is providing an opion to override the default image from gravatar with a local image.
I was planing to provide a tranperent 1×1 as an option and a custom URL for the other.
so when in the avatar list there would be an hole if no gravatar rather than the grey/white man
To remove users without Gravatar from the list is harder as it is costly in time to ping for the 404’s two throughts
we don’t do it every time and cache the results witch is a pile of server code
we do it client side in JS by walking the list and do an ajax call for each image and remove the images that return 404’s
- The topic ‘[Plugin: Author Avatars List] Ignoring users with no gravatar’ is closed to new replies.