Tag Info

New answers tagged

0

I successfully replaced all gravitar.com avatars with my own locally hosted avatar image by adding this to my theme's function.php file: define('DEFAULT_AVATAR_URL', get_template_directory_uri() . '/images/user.png'); function no_gravatars( $avatar ) { return preg_replace( "/http.*?gravatar\.com[^\']*/", DEFAULT_AVATAR_URL, $avatar ); } add_filter( ...


0

You can use the get_avatar filter to modify the output of the image tag and add your HTML attribute return apply_filters( 'get_avatar', $avatar, $id_or_email, $size, $default, $alt ); $avatar : Image tag for the user's avatar.


0

Actually there have no filter option for Avatar HTML markup. But I think that you can do it by odd way. I did not test the code but you can try this once: get_avatar($comment, 50, vol_random_image() , "' nopin='nopin");



Top 50 recent answers are included