去掉WP拖油瓶Open Sans字体

最近博友们都在抱怨博客打开的速度越来越慢,究其原因,就是谷歌字体open sans被QIANG了,外面的世界进不来,里面的博客拼命连接,怎么可能不慢呢?
简单粗暴的方法,提取Remove Open Sans font from WP core插件的代码:

//移除谷歌sans字体  
function remove_open_sans() {   
wp_deregister_style( 'open-sans' );   
wp_register_style( 'open-sans', false );   
wp_enqueue_style('open-sans','');   
}   
add_action( 'init', 'remove_open_sans' );

直接丢到你的functions.php文件,取消掉加载谷歌字体,博客瞬间提速好几倍了!

NOOLDEY

本文作者:NOOLDEY

做一个诗情画意的码农,皮皮猪,我们走!

原文链接: http://zhuweisheng.com.cn/wordpress/remove-sans/

本站文章如无特殊声明均为原创,创作不易,转载请注明来源,谢谢!