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; });