This filter can be used for changing the printed user avatar ID or email.
Parameters
1. $authorAvatarField (type: int/string) – the user id or email (this depends on the user role, it can be either user or the guest) of the current comment that is used to get the avatar
2. $comment (type: WP_Comment object) – the object of the current comment
3. $user (type: WP_User object) – the object of the current user
4. $profileUrl (type: string) – the profile URL of the current user
Usage
add_filter("wpdiscuz_author_avatar_field", function ($authorAvatarField, $comment, $user, $profileUrl) {
if ($comment->user_id == 3) {
$authorAvatarField = 0;
}
return $authorAvatarField;
}, 10, 4);
Changelog
Since 7.0.0 version
