禁用谷歌字体有很多插件,但是撞了插件就会有个问题就是让后台运行变得更加缓慢了。
所以还是增加代码吧:
function kratos_get_avatar( $avatar ) {
$avatar = preg_replace( “/http:\/\/(www|\d).gravatar.com/”,”http://cn.gravatar.com”,$avatar );
return $avatar;
}
add_filter( ‘get_avatar’, ‘kratos_get_avatar’ );
function coolwp_remove_open_sans_from_wp_core() {
wp_deregister_style( ‘open-sans’ );
wp_register_style( ‘open-sans’, false );
wp_enqueue_style(‘open-sans’,”);}
add_action( ‘init’, ‘coolwp_remove_open_sans_from_wp_core’ );