From fe479844bce70c54f8b3acbe61626e9c5a2eb6e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com>
Date: Sat, 20 Feb 2021 09:46:06 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
core/core.php | 6 ++++--
core/function.php | 6 +++---
public/include.php | 4 ++--
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/core/core.php b/core/core.php
index 9a14a27..1e3900a 100644
--- a/core/core.php
+++ b/core/core.php
@@ -117,7 +117,8 @@ function themeFields($layout)
'SEO关键词(非常重要!)',
'介绍:用于设置当前页SEO关键词
注意:多个关键词使用英文逗号进行隔开
- 例如:Typecho,Typecho主题,Typecho模板'
+ 例如:Typecho,Typecho主题,Typecho模板
+ 其他:如果不填写此项,则默认取文章标签'
);
$layout->addItem($keywords);
@@ -127,7 +128,8 @@ function themeFields($layout)
NULL,
'SEO描述语(非常重要!)',
'介绍:用于设置当前页SEO描述语
- 注意:SEO描述语不应当过长也不应当过少'
+ 注意:SEO描述语不应当过长也不应当过少
+ 其他:如果不填写此项,则默认截取文章片段'
);
$layout->addItem($description);
diff --git a/core/function.php b/core/function.php
index d2c498d..48927f4 100644
--- a/core/function.php
+++ b/core/function.php
@@ -3,7 +3,7 @@
/* 获取主题当前版本号 */
function _getVersion()
{
- return "5.2.4";
+ return "5.2.5";
};
/* 判断是否是手机 */
@@ -185,7 +185,7 @@ function _getAbstract($item, $type = true)
if ($item->fields->abstract) {
$abstract = $item->fields->abstract;
} else {
- $abstract = strip_tags($item->excerpt);
+ $abstract = Typecho_Common::subStr(strip_tags($item->excerpt), 0, 180, '...');;
}
}
if ($abstract === '') $abstract = "暂无简介";
@@ -310,4 +310,4 @@ function _checkSensitiveWords($words_str, $str)
}
}
return false;
-}
\ No newline at end of file
+}
diff --git a/public/include.php b/public/include.php
index 87e25e3..e5e72d6 100644
--- a/public/include.php
+++ b/public/include.php
@@ -43,8 +43,8 @@