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('/ + +
+
+ +
+ +