修复:后台加速功能误对处于测试状态的WordPress起作用的问题

This commit is contained in:
sunxiyuan 2020-10-28 16:35:49 +08:00
parent ff25331317
commit b090bf9172

View file

@ -84,7 +84,7 @@ class WP_CHINA_YES {
/**
* 将WordPress核心所依赖的静态文件访问链接替换为公共资源节点
*/
if (get_option('super_admin') != 2) {
if (get_option('super_admin') != 2 && !stristr($GLOBALS['wp_version'], 'alpha') && !stristr($GLOBALS['wp_version'], 'beta')) {
$this->page_str_replace('preg_replace', [
'~' . home_url('/') . '(wp-admin|wp-includes)/(css|js)/~',
sprintf('https://a2.wp-china-yes.net/WordPress@%s/$1/$2/', $GLOBALS['wp_version'])