From 59a16c642d47e64ddb7753851d6701a50f53016c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E8=90=BD?= Date: Mon, 27 Jan 2020 12:06:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=87=BD=E6=95=B0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- framework/options-config.php | 48 ++++++++++++----- framework/plugin-options.php | 16 +++--- functions/advanced.php | 2 +- functions/optimization.php | 16 +++--- functions/security.php | 6 +-- functions/seo.php | 51 +++++++++++++++++++ .../functions => functions}/sitemap-xml.php | 22 ++++---- modules/base/functions/seo-extra.php | 45 ---------------- 8 files changed, 116 insertions(+), 90 deletions(-) rename {modules/base/functions => functions}/sitemap-xml.php (85%) diff --git a/framework/options-config.php b/framework/options-config.php index 7530ba6..2770dc9 100644 --- a/framework/options-config.php +++ b/framework/options-config.php @@ -128,24 +128,44 @@ $gdk_options = [ 'std' => '|' ], [ - 'name' => '自动内链', - 'desc' => '启用', - 'id' => 'git_autolink_b', - 'type' => 'checkbox' - ], - [ - 'name' => '关键词出现数目', - 'desc' => '文章中少于这个数字的关键词将不自动内链,默认是1,即全部链接', - 'id' => 'git_autolink_1', - 'type' => 'number', - 'std' => 1 + 'name' => '文章自动内链', + 'desc' => '该功能会将文章中与标签匹配的文字自动添加标签链接,如果是纯文字的内容建议打开,默认禁用', + 'id' => 'gdk_tag_link', + 'type' => 'radio', + 'options' => [ + '0' => '禁用', + '1' => '开启' + ], + 'std' => '0' ], [ 'name' => '关键词链接次数', - 'desc' => '文章中最多链接的次数,默认是6', - 'id' => 'git_autolink_2', + 'desc' => '文章中最多链接的次数,默认是5', + 'id' => 'gdk_tag_num', 'type' => 'number', - 'std' => 6 + 'std' => 5 + ], + [ + 'name' => 'Robots.txt 优化', + 'desc' => '该功能会自动生成一个虚拟Robots.txt文件,和真实文件效果一样的,默认开启', + 'id' => 'gdk_robots', + 'type' => 'radio', + 'options' => [ + '0' => '禁用', + '1' => '开启' + ], + 'std' => '1' + ], + [ + 'name' => '网站地图 sitemap_xml', + 'desc' => '该功能会自动生成网站地图链接:域名/sitemap_xml,开启后建议更新固定链接一次,默认开启', + 'id' => 'gdk_sitemap_xml', + 'type' => 'radio', + 'options' => [ + '0' => '禁用', + '1' => '开启' + ], + 'std' => '1' ], [ 'name' => '图片自动添加alt以及title', diff --git a/framework/plugin-options.php b/framework/plugin-options.php index 1b369cf..2bb1e2c 100644 --- a/framework/plugin-options.php +++ b/framework/plugin-options.php @@ -30,7 +30,7 @@ function gdk_update_options() { gdk_update_options(); //获取设置选项 -function gdk_get_option($id, $returnDefault = false) { +function gdk_option($id, $returnDefault = false) { global $gdk_default_options, $gdk_current_options; return stripslashes( $returnDefault ? $gdk_default_options[$id] : $gdk_current_options[$id] ); } @@ -92,7 +92,7 @@ switch ( $type ) { case 'text': ?>

-

+

$name) : ?> @@ -127,7 +127,7 @@ switch ( $type ) { case 'checkbox': ?>
- $name ) : ?>