diff --git a/inc/options-framework/css/optionsframework.css b/inc/options-framework/css/optionsframework.css index 073e4b9..43c0a0b 100755 --- a/inc/options-framework/css/optionsframework.css +++ b/inc/options-framework/css/optionsframework.css @@ -268,6 +268,10 @@ height: auto; } +#optionsframework .about-content .maocloud { + width: 200px; +} + #optionsframework .about-content h4 { margin-top: 20px; margin-bottom: 16px; diff --git a/inc/options-framework/includes/class-options-interface.php b/inc/options-framework/includes/class-options-interface.php index 0035250..80cb781 100755 --- a/inc/options-framework/includes/class-options-interface.php +++ b/inc/options-framework/includes/class-options-interface.php @@ -226,8 +226,8 @@ class Options_Framework_Interface global $wp_version; $version = $wp_version; $output .= '
- -

' . __('基础信息', 'kratos') . '

+ +

' . __('基础信息', 'kratos') . '

' . __('提示:在提交主题相关问题反馈时,请将上面「基础信息」中的内容复制到环境信息中。', 'kratos') . '

-

' . __('资料文档', 'kratos') . '

+

' . __('资料文档', 'kratos') . '

-

' . __('讨论交流', 'kratos') . '

+

' . __('讨论交流', 'kratos') . '

' . __('欢迎使用 Kratos 主题开始文章创作,诚邀您加入主题交流 QQ 群:734508', 'kratos') . '

-

' . __('版权声明', 'kratos') . '

+

' . __('版权声明', 'kratos') . '

' . __('主题源码使用 MIT 协议 进行许可,说明文档使用 CC BY-NC-ND 4.0 进行许可。', 'kratos') . '

-

' . __('打赏支持', 'kratos') . '

- -

' . __('项目的发展需要您的支持和鼓励,打赏时请确认作者姓名为姜学栋', 'kratos') . '

+

' . __('打赏支持', 'kratos') . '

+ +

' . __('项目的发展需要您的支持和鼓励,打赏时请确认作者姓名为姜学栋', 'kratos') . '

+

' . __('赞助商', 'kratos') . '

+
'; break; diff --git a/inc/options-framework/js/options-custom.js b/inc/options-framework/js/options-custom.js index b307d31..2b819b5 100755 --- a/inc/options-framework/js/options-custom.js +++ b/inc/options-framework/js/options-custom.js @@ -16,6 +16,14 @@ jQuery(document).ready(function($) { $('#section-'+id+'_links').show(); } + jQuery('#g_cdn').click(function() { + jQuery('#section-g_cdn_n3').fadeToggle(400); + }); + + if (jQuery('#g_cdn:checked').val() !== undefined) { + jQuery('#section-g_cdn_n3').show(); + } + jQuery('#g_cc_switch').click(function() { jQuery('#section-g_cc').fadeToggle(400); }); diff --git a/inc/theme-core.php b/inc/theme-core.php index 8712d78..f9457cb 100644 --- a/inc/theme-core.php +++ b/inc/theme-core.php @@ -28,7 +28,11 @@ add_action('after_setup_theme', 'theme_languages'); function theme_autoload() { if (kratos_option('g_cdn', false)) { - $dir = 'https://cdn.jsdelivr.net/gh/vtrois/kratos@' . THEME_VERSION; + $cdn_array = array( + 'maocloud' => 'https://n3.cdn.vtrois.com/kratos/' . THEME_VERSION, + 'jsdelivr' => 'https://cdn.jsdelivr.net/gh/vtrois/kratos@' . THEME_VERSION, + ); + $dir = $cdn_array[kratos_option('g_cdn_n3', 'maocloud')]; } else { $dir = get_template_directory_uri(); } diff --git a/inc/theme-options.php b/inc/theme-options.php index 7d9e1a5..7780852 100644 --- a/inc/theme-options.php +++ b/inc/theme-options.php @@ -41,6 +41,11 @@ function kratos_options() 'color' => __( '颜色导航', 'kratos' ), ); + $cdn_array = array( + 'maocloud' => __( '猫云', 'kratos' ), + 'jsdelivr' => __( 'jsDelivr', 'kratos' ), + ); + $options = array(); $options[] = array( @@ -86,6 +91,15 @@ function kratos_options() 'type' => 'checkbox', ); + $options[] = array( + 'desc' => __('选择 CDN 加速节点', 'kratos'), + 'id' => 'g_cdn_n3', + 'std' => 'maocloud', + 'type' => 'select', + 'class' => 'hidden', + 'options' => $cdn_array, + ); + $options[] = array( 'name' => __('Gutenberg 编辑器', 'kratos'), 'desc' => __('开启 Gutenberg 编辑器', 'kratos'),