禁用wordpress后台google字体

众所周知的原因,google这次挂的很彻底,chrome、gmail、翻译等全线google服务都受到很大影响。

wordpress因为使用了Google Fonts字体,后台打开需要加载数十秒,无法忍受的慢,只好干掉这项服务了。

2014-06-04_191654

方法一:

后台搜索Disable Google Fonts插件安装。

方法二:

主题的functions.php添加以下代码

//禁用Open Sans
classDisable_Google_Fonts{
        publicfunction__construct(){
                add_filter('gettext_with_context',array($this,'disable_open_sans'             ),888,4);
        }
        publicfunctiondisable_open_sans($translations,$text,$context,$domain){
                if('Open Sans font: on or off'==$context&&'on'==$text){
                        $translations='off';
                }
                return$translations;
        }
}
$disable_google_fonts=newDisable_Google_Fonts;
up:写完这篇blog,发现数字做了镜像的字体加速CDN,刚刚更换测试了下,也可解决上述问题,需要的朋友可以试试。
9ac38936jw1eh2cddr05fj20c81gen6v
最后,我想再骂一次:尼玛的!


微信扫描下方的二维码阅读本文

© 版权声明
THE END
喜欢就支持一下吧~
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容