很多用戶說古騰堡編輯器加載速度太慢了。
這是因為加載了谷歌字體CSS。國內是無法訪問谷歌資源的,所以建議禁止加載谷歌字體。
插件
代碼
把以下代碼添加到當前使用的主題的functions.php裡面就可以了
// 禁用WP Editor Google字體css
function mytheme_remove_gutenberg_styles($translation, $text, $context, $domain)
{
if($context != 'Google Font Name and Variants' || $text != 'Noto Serif:400,400i,700,700i')
{return $translation;
}
return 'off';
}
add_filter( 'gettext_with_context', 'xintheme_remove_gutenberg_styles',10, 4);
代碼加到當前主題的functions.php裡面