Little issue with author avatars
-
Hi Harry,
your plugin is a great idea! But it has some litte backdraws.
– the author avatar of a blog posting is not beeing recognized correctly in any loop
– gravatar “new url” doesn’t work on our serverI’ve modified your script a little bit, so that it’ll work for us on https://www.gamerz.one. I use https://www.gravatar.com/avartar URL for every request – only this works on our server (Linux Ubuntu 14.04, Apache 2.4, PHP-FPM 7.0).
Also I modified the lines 810 to 822 so it looks like this:
`$mail=get_comment_author_email();
if(empty($mail)) {
if(in_the_loop()) {
$mail = get_the_author_meta( ‘user_email’ );
} else {
$mail=get_comment_author_url();
$no_mail=1;
}
}
$author=get_comment_author();
if(in_the_loop()) {
$author = get_the_author();
}`I do not know, if this is the best way to fix the author image within the loops, ist just a quick fix, that works for me.
Just as an idea: Why not build a funktion which theme developers can call manually if necessary? This might also be a performance consideration because the filter runs on every loop as default even if its not necessary…
Or did i miss something?
- The topic ‘Little issue with author avatars’ is closed to new replies.