解决WordPress 后台打开速度慢的问题

添加代码至function.php文件

找到模版函数文件(functions.php),在这个文件添加如下代码:

// 后台禁用Google Open Sans字体,加速网站

add_filter( 'gettext_with_context', 'wpdx_disable_open_sans', 888, 4 );
function wpdx_disable_open_sans( $translations, $text, $context, $domain ) {
if ( 'Open Sans font: on or off' == $context && 'on' == $text ) {
$translations = 'off';
}
return $translations;
}

原文地址:https://wuzuhua.cn/2019/01/18/dksd.html

你可能感兴趣的:(WordPress,后台打开慢)