New answers tagged

0

I know this is old post but had same issue and figured it out: user ID is of the author of the original post (article) against which the comment was written ... best to repress comment gravatars altogether, or put in a filter to lookup by email io users ....


0

I might have found a solution. It seems to work, but maybe I am missing something? function custom_user_avatar( $avatar, $id_or_email, $size, $default, $alt ) { $user = false; if ( is_numeric( $id_or_email ) ) { $id = (int) $id_or_email; $user = get_user_by( 'id' , $id ); } else if ( is_object( $id_or_email ) ) { if ( ! ...


Top 50 recent answers are included