From d86b57684f5ff6c4e72e48b8373300bee5f40c9c Mon Sep 17 00:00:00 2001 From: nanhaoluo <3075912108@qq.com> Date: Thu, 15 Jan 2026 15:35:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E7=9B=AE=E5=BD=95=E5=92=8C=E9=A1=B6=E6=A0=8F=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移动端抽屉栏新增顶栏自定义链接显示(argon_toolbar_links_left/right) - 优化 have_catalog() 函数,增加对 Gutenberg 标题块和 Markdown 标题的检测 - 自定义链接显示在导航菜单和侧边栏菜单之间 --- functions.php | 14 +++++++++++--- sidebar.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index 49f2fed..e36a72b 100644 --- a/functions.php +++ b/functions.php @@ -631,11 +631,19 @@ function have_catalog(){ return true; } $content = get_post(get_the_ID()) -> post_content; - if (preg_match('//',$content)){ + // 检查 HTML 标题标签 + if (preg_match('//i', $content)){ return true; - }else{ - return false; } + // 检查 Gutenberg 标题块 + if (preg_match('/ + +
+
+ +
+ +