Update functions.php

This commit is contained in:
Mashiro 2020-01-11 23:04:31 +08:00 committed by GitHub
parent 376efe91a2
commit be6a6e76c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -609,7 +609,9 @@ function get_link_items()
function gravatar_cn($url) function gravatar_cn($url)
{ {
$gravatar_url = array('0.gravatar.com', '1.gravatar.com', '2.gravatar.com', 'secure.gravatar.com'); $gravatar_url = array('0.gravatar.com', '1.gravatar.com', '2.gravatar.com', 'secure.gravatar.com');
return str_replace($gravatar_url, 'cn.gravatar.com', $url); //return str_replace($gravatar_url, 'cn.gravatar.com', $url);
//官方服务器近期大陆访问 429建议使用镜像
return str_replace( $gravatar_url, 'gravatar.2heng.xin', $url );
} }
add_filter('get_avatar_url', 'gravatar_cn', 4); add_filter('get_avatar_url', 'gravatar_cn', 4);