Image won't appear when using get_avatar() call
-
Hi,
I am using in my themes get_avatar() call to fetch author’s image. I tried your plugin and it won’t show the image though it’s working fine on comments and all other places. I took a time and fixed this issue.
Problem was in function ‘get_easy_author_image’. Function ‘get_avatar’ can pass as first argument users ID or E-Mail (object). Situation when user pass ‘user_id’ as argument wasn’t handled so I changed a function to support this.
This is good because users now can use standardized way to fetch avatar (they don’t need to use get_author_image_url() function) and if they decide to remove the plugin, their theme will work fine (no need to remove the calls to get_author_image_url()).Here is the code.
Note that code I added was partly taken from WordPress ‘get_avatar()’ function. That’s how they do it.Vladimir
- The topic ‘Image won't appear when using get_avatar() call’ is closed to new replies.