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": [