I need for a specific plugin to override the wordpress function get_avatar() to bind the profile image to an other image with some condition.

How can I do this ? Is there a specific hook or filter to do this ?


There is get_avatar filter. codex ref


I can ovveride in functions.php the function get_avatar() but the best way seems to use the filter get_avatar.

I found the answer here : https://codex.wordpress.org/Plugin_API/Filter_Reference/get_avatar

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.