How do I get the avatar URL instead of an HTML IMG tag when using get_avatar?
题
I'm using a plugin called Simple Local Avatars which lets me upload author images which are stored on my server locally (no Gravatar). The plugin works fine and get_avatar
returns the local avatar.
However, I need to use that avatar in different ways and different places and for that I need the local avatar image URL instead of the entire HTML tag. I could write a wrapper function for get_avatar
that uses RegEx or SimpleXML to pick out and return only the URL, but I was wondering if there's any existing way to do this.
没有正确的解决方案