很多用户说古腾堡编辑器加载速度太慢了。
这是因为加载了谷歌字体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里面