<?php echo get_avatar( ’[email protected]’, 64, ‘https://www.example.com/custom-default-avatar.png’, ‘Image Alt Text’ ); ?>
this works but shortcode doesn’t its not parsing anything.. just displaying
[get_avatar id=”[email protected]” size=”64″ default=”https://www.example.com/custom-default-avatar.png” alt”Image Alt Text”]
hmm..
2. i tried to use avatar from other forum, [people same id’s] and i didint want to use gravatars i made a code
// nook : usuwanie gravatara, jesli avatara nie ma to pobiera z forum
function no_gravatars( $avatar ) {
$filename = ‘https://www.terrarium.pl/uploads/profile/photo-thumb-‘.get_the_author_meta(ID).’.jpg’;
$file_headers = @get_headers($filename);
if (stripos($file_headers[0],”404″) >0 || (stripos($file_headers[0], “302”) > 0 && stripos($file_headers[7],”404″) > 0))
{ echo ”; } else {
return preg_replace( “/http.*?gravatar\.com[^\’]*/”, ‘https://www.terrarium.pl/uploads/profile/photo-thumb-‘.get_the_author_meta(ID).’.jpg’, $avatar );
}
but today isn’t working :/ it worked yesterday …. lol