这是一个说大不大说小不小的问题,但还是有必要处理下,找到 avada 主题
/Avada/includes/lib/inc/redux/framework/FusionReduxCore/core/enqueue.php
打开 enqueue.php 文件定位到大约 291 行,如下:
wp_enqueue_script(
'webfontloader',
'https://ajax.googleapis.com/ajax/libs/webfont/1.5.0/webfont.js',
array( 'jquery' ),
'1.5.0',
true
);
}
将
https://ajax.googleapis.com/ajax/libs/webfont/1.5.0/webfont.js
替换为 `#` 修改后如下:
wp_enqueue_script(
'webfontloader',
'#',
array( 'jquery' ),
'1.5.0',
true
);
}
将
https://ajax.googleapis.com/ajax/libs/webfont/1.5.0/webfont.js
保存即可。
这个是主题后台的嵌入 js 所以暂时没有好的方法可处理,后续的我们会想想其他方式。
另一个文件在于:
找到
Avada/includes/lib/inc/redux/framework/FusionReduxCore/framework.php
var wf = document.createElement( 'script' );
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.3/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
大约在 1677 行,修改方法同上
替换后为
var wf = document.createElement( 'script' );
wf.src = '#';
wf.type = 'text/javascript';
wf.async = 'true';
看不懂,太深奥了