WordPress gravatar头像被墙后调用多说服务器显示


以下代码加入函数文件即可。

//头像用多说服务器
function mytheme_get_avatar($avatar) {
$avatar = str_replace(array("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 );

声明:豆瓣不小心|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - WordPress gravatar头像被墙后调用多说服务器显示


Don't Worry,Be Happy