From 58dd89e1d3c3d254f5ede64b182fc780dabe9a9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=98=94=E8=90=BD?=
<45323514+BigCoke233@users.noreply.github.com>
Date: Sun, 31 Mar 2019 15:01:19 +0800
Subject: =?UTF-8?q?=E6=9B=B4=E5=8A=A0=E5=AE=9E=E7=94=A8=E6=9B=B4=E5=8A=A0?=
=?UTF-8?q?=E7=A8=B3=E5=AE=9A=E7=9A=84=E7=9F=AD=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
includes/post-content.php | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/includes/post-content.php b/includes/post-content.php
index 21a45ce..0619795 100644
--- a/includes/post-content.php
+++ b/includes/post-content.php
@@ -1,5 +1,4 @@
content;
$content = preg_replace('/
/s','',$content);
@@ -45,7 +44,32 @@
//滚动文本区域
$reg = '/\[stext\](.*?)\[\/stext\]/s';
$rp = '${1}
';
+ $content = preg_replace($reg,$rp,$content);
+
+ //解析按钮
+ $reg = '/\[btn url="(.*?)" type="(.*?)" ico="(.*?)"\](.*?)\[\/btn\]/s';
+ $rp = ' ${4}';
+ $content = preg_replace($reg,$rp,$content);
+
+ //解析嵌入块
+ $reg = '/\[well\](.*?)\[\/well\]/s';
+ $rp = '${1}
';
$content = preg_replace($reg,$rp,$content);
+ //解析面板
+ //无参数面板
+ $reg = '/\[panel\](.*?)\[\/panel\]/s';
+ $rp = '';
+ $content = preg_replace($reg,$rp,$content);
+ //有标题的面板
+ $reg = '/\[panel title="(.*?)"\](.*?)\[\/panel\]/s';
+ $rp = '';
+ $content = preg_replace($reg,$rp,$content);
+
+ //解析列表组
+ $reg = '/\[lg\](.*?)\[\/lg\]/s';
+ $rp = '';
+ $content = preg_replace($reg,$rp,$content);
+
echo $content;
?>
\ No newline at end of file
--
cgit v1.2.3