From b0fd30c2d76670660ff03b01669589f349b3d034 Mon Sep 17 00:00:00 2001 From: Seaton Jiang Date: Sun, 12 Mar 2023 16:22:21 +0800 Subject: [PATCH] feat: remove static resource acceleration (CDN) --- inc/theme-core.php | 12 +++--------- inc/theme-options.php | 9 +-------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/inc/theme-core.php b/inc/theme-core.php index 4c8e8da..4554fb9 100644 --- a/inc/theme-core.php +++ b/inc/theme-core.php @@ -4,16 +4,10 @@ * 核心函数 * @author Seaton Jiang * @license GPL-3.0 License - * @version 2022.11.27 + * @version 2023.03.12 */ -// CDN 资源地址 -if (kratos_option('g_cdn', false)) { - $asset_path = 'https://cdn.seatonjiang.com/kratos/' . THEME_VERSION; -} else { - $asset_path = get_template_directory_uri(); -} -define('ASSET_PATH', $asset_path); +define('ASSET_PATH', get_template_directory_uri()); // 自动跳转主题设置 function init_theme() @@ -106,7 +100,7 @@ function theme_autoload() 'directory' => ASSET_PATH, 'alipay' => kratos_option('g_donate_fieldset')['g_donate_alipay'] ?? '', 'wechat' => kratos_option('g_donate_fieldset')['g_donate_wechat'] ?? '', - 'lightgallery' => kratos_option('g_lightgallery',true), + 'lightgallery' => kratos_option('g_lightgallery', true), 'repeat' => __('您已经赞过了', 'kratos'), 'thanks' => __('感谢您的支持', 'kratos'), 'donate' => __('打赏作者', 'kratos'), diff --git a/inc/theme-options.php b/inc/theme-options.php index 04624a2..d35663a 100644 --- a/inc/theme-options.php +++ b/inc/theme-options.php @@ -4,7 +4,7 @@ * 主题选项 * @author Seaton Jiang * @license GPL-3.0 License - * @version 2022.04.30 + * @version 2023.03.12 */ defined('ABSPATH') || exit; @@ -120,13 +120,6 @@ CSF::createSection($prefix, array( 'subtitle' => __('启用/禁用 Font Awesome Free 字体', 'kratos'), 'default' => false, ), - array( - 'id' => 'g_cdn', - 'type' => 'switcher', - 'title' => __('静态资源加速', 'kratos'), - 'subtitle' => __('启用/禁用静态资源加速', 'kratos'), - 'default' => true, - ), array( 'id' => 'g_renameimg', 'type' => 'switcher',