10
使用V2EX的CDN解决Gravatar加载慢问题
source link: https://arminli.com/v2ex-cdn/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Armin's Blog
使用V2EX的CDN解决Gravatar加载慢问题
August 04, 2016
在主题的 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');
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK