From bbc55ccaee247f66ac8e55da3c45521a47326b1a Mon Sep 17 00:00:00 2001 From: liaoxin Date: Tue, 5 May 2026 01:00:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=A8=80=E6=A0=87=E9=A2=98=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20=E5=BE=AE=E8=A8=80-=E6=97=B6=E9=97=B4=E6=88=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/functions.php b/functions.php index c3308b2..90ad8eb 100644 --- a/functions.php +++ b/functions.php @@ -378,8 +378,7 @@ function kjweji_customize_register($wp_customize) { // tucao 自动生成标题 add_filter('wp_insert_post_data', function($data) { if ($data['post_type'] === 'tucao' && empty($data['post_title'])) { - $content = wp_strip_all_tags($data['post_content'] ?? ''); - $data['post_title'] = mb_substr($content ?: '微言', 0, 30); + $data['post_title'] = '微言-' . time(); } return $data; });