diff --git a/footer.php b/footer.php index 3dba767..65784b7 100644 --- a/footer.php +++ b/footer.php @@ -10,7 +10,11 @@
- +options->optimizeOptions) && in_array('EnableCdn', $this->options->optimizeOptions)) : ?> + + + + footer(); ?> options->footer(); ?> diff --git a/functions.php b/functions.php index 43128df..998211b 100644 --- a/functions.php +++ b/functions.php @@ -1,6 +1,8 @@ addInput($avatarUrl); @@ -11,6 +13,13 @@ function themeConfig($form) { $icpNumber = new Typecho_Widget_Helper_Form_Element_Text('icpNumber', NULL, NULL, _t('ICP 备案许可证号'), _t('在这里填入一个 ICP 备案许可证号, 留空则不显示.')); $form->addInput($icpNumber); + $optimizeOptions = new Typecho_Widget_Helper_Form_Element_Checkbox('optimizeOptions', array( + 'EnableCdn' => _t('使用 CDN 加速本主题内的 CSS & JS 文件') + ), array( + 'EnableCdn' + ), _t('优化选项')); + $form->addInput($optimizeOptions->multiMode()); + $header = new Typecho_Widget_Helper_Form_Element_Textarea('header', NULL, NULL, _t('自定义 Header'), _t('在这里填入自定义 Header, 如自定义 CSS 样式等.')); $form->addInput($header); diff --git a/header.php b/header.php index 1a92c05..aedcc95 100644 --- a/header.php +++ b/header.php @@ -15,8 +15,13 @@ options->themeColor) : ?> - - +options->optimizeOptions) && in_array('EnableCdn', $this->options->optimizeOptions)) : ?> + + + + + + header(); ?> options->header(); ?>