在主题的 function.php 中,在最后面添加:
//replace Gravatar from V2EX
function my_get_avatar( $avatar ) {
$avatar = preg_replace("/https:\/\/(secure|\d).gravatar.com\/avatar\//","https://cdn.v2ex.com/gravatar/",$avatar);
return $avatar;
}
add_filter('get_avatar', 'my_get_avatar');