mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-04 20:19:53 +08:00
重构:格式化代码并更正一处注释错误
This commit is contained in:
parent
1fe82c0831
commit
b2470d503b
1 changed files with 2 additions and 2 deletions
|
@ -65,12 +65,12 @@ if (is_admin() && !(defined('DOING_AJAX') && DOING_AJAX)) {
|
|||
|
||||
|
||||
/**
|
||||
* 将WordPress核心所依赖的静态文件访问链接替换为jsDelivr提供的CDN节点
|
||||
* 将WordPress核心所依赖的静态文件访问链接替换为公共资源节点
|
||||
*/
|
||||
if (get_option('super_admin') == 1) {
|
||||
add_action('init', function () {
|
||||
ob_start(function ($buffer) {
|
||||
return preg_replace('~'.home_url('/').'(wp-admin|wp-includes)/(css|js)/~', sprintf('https://a2.wp-china-yes.net/WordPress@%s/$1/$2/', $GLOBALS['wp_version']), $buffer);
|
||||
return preg_replace('~' . home_url('/') . '(wp-admin|wp-includes)/(css|js)/~', sprintf('https://a2.wp-china-yes.net/WordPress@%s/$1/$2/', $GLOBALS['wp_version']), $buffer);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue