wordpress gravatar头像不显示的解决方法

function mytheme_get_avatar($avatar) {
$avatar = str_replace(array(“http://www.gravatar.com”,”0.gravatar.com”,”1.gravatar.com”,”2.gravatar.com”),”gravatar.duoshuo.com”,$avatar);
return $avatar;
}
add_filter( “get_avatar”, “mytheme_get_avatar”, 10, 3 );

放到模板函数 functions.php