Guest User

Untitled

a guest
May 28th, 2020
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. function disable_comment_avatar($avatar, $id_or_email, $size, $default, $alt)
  2. {
  3. global $in_comment_loop;
  4.  
  5. if(isset($in_comment_loop))
  6. {
  7. if($in_comment_loop == true)
  8. {
  9. return "<img alt='{$alt}' src='' style='display:none;' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' />";
  10. }
  11. else
  12. {
  13. return $avatar;
  14. }
  15. }
  16. else
  17. {
  18. return $avatar;
  19. }
  20. }
  21.  
  22. add_filter("get_avatar" , "disable_comment_avatar" , 1, 5);
Advertisement
Add Comment
Please, Sign In to add comment