在网上看了很多方法,有的没效果:最后都定位到这个网站了 http://libs.useso.com/ ,抱着恐惧的心理还是用了一下,还真管事:
下载地址:http://www.soulteary.com/wp-content/uploads/2014/06/Replace-Google-Fonts.zip
</pre><a target=_blank href="http://www.soulteary.com/wp-content/uploads/2014/06/Replace-Google-Fonts.zip" target="_blank"></a><p></p><p><pre name="code" class="php"><?php
/**
* Plugin Name: Replace Google Fonts
* Plugin URI: http://www.soulteary.com/2014/06/08/replace-google-fonts.html
* Description: Use Qihoo 360 Open Fonts Service to replace Google's.
* Author: soulteary
* Author URI: http://www.soulteary.com/
* Version: 1.0
* License: GPL
*/
/**
* Silence is golden
*/
if (!defined('ABSPATH')) exit;
class Replace_Google_Fonts
{
/**
* init Hook
*
*/
public function __construct()
{
add_filter('style_loader_tag', array($this, 'ohMyFont'), 1000, 1);
}
/**
* Use Qihoo 360 Open Fonts Service to replace Google's.
*
* @param $text
* @return mixed
*/
public function ohMyFont($text)
{
return str_replace('//fonts.googleapis.com/', '//fonts.useso.com/', $text);
}
}
/**
* bootstrap
*/
new Replace_Google_Fonts;
以上就是代码。。。希望不会有事的。。。