From 37859ddf68aff7ccd1671e878b88f02174ca0ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com> Date: Wed, 28 Apr 2021 17:20:27 +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/factory.php | 1 + core/function.php | 5 ++++- package.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/factory.php b/core/factory.php index d8f8bb0..6a0e0ab 100644 --- a/core/factory.php +++ b/core/factory.php @@ -1,4 +1,5 @@ comment = array('Intercept', 'message'); class Intercept diff --git a/core/function.php b/core/function.php index e25d018..e8099ee 100644 --- a/core/function.php +++ b/core/function.php @@ -2,7 +2,7 @@ /* 获取主题当前版本号 */ function _getVersion() { - return "6.7.4"; + return "6.7.5"; }; /* 判断是否是手机 */ @@ -186,6 +186,9 @@ function _getAbstract($item, $type = true) $abstract = $item->fields->abstract; } else { $abstract = strip_tags($item->excerpt); + if (strpos($abstract, '{hide') !== false) { + $abstract = preg_replace('/{hide[^}]*}([\s\S]*?){\/hide}/', '隐藏内容,请前往内页查看详情', $abstract); + } } } if ($abstract === '') $abstract = "暂无简介"; diff --git a/package.json b/package.json index f3efaf1..11b4a8f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typecho-joe-next", - "version": "6.7.4", + "version": "6.7.5", "description": "A Theme Of Typecho", "main": "index.php", "keywords": [