1、禁用谷歌字体【在主题functions.php末加入如下代码】
[php]class Disable_Google_Fonts{
public function __construct(){
add_filter(‘gettext_with_context’,array($this,’disable_open_sans’),888,4);
}
public function disable_open_sans($translations,$text,$context,$domain ){
if (‘Open Sans font: on or off’ == $context && ‘on’ == $text){
$translations = ‘off’;
}
return $translations;
}
}
$disable_google_fonts = new Disable_Google_Fonts;[/php]
2、使用多说图像缓存【在主题functions.php末加入如下代码】
[php]function get_avatar_uctheme( $avatar ) {
$avatar = preg_replace( “/http:\/\/(www|\d).gravatar.com/”,”http://gravatar.duoshuo.com”,$avatar );
return $avatar;
}
add_filter( ‘get_avatar’, ‘get_avatar_uctheme’ );[/php]