From 0290c4fea952122627897d10b26beed3fa239cf0 Mon Sep 17 00:00:00 2001 From: nanhaoluo <3075912108@qq.com> Date: Thu, 22 Jan 2026 18:52:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E5=8F=AA=E8=83=BD=E6=8F=90=E4=BA=A4=E4=B8=80=E6=AC=A1=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 AI 检测改回异步执行(延迟 1 秒) - 避免同步执行阻塞评论提交流程 - 确保评论元数据先保存完成 --- functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 4ac7cc7..1897548 100644 --- a/functions.php +++ b/functions.php @@ -7627,8 +7627,8 @@ function argon_auto_detect_spam_on_comment($comment_id, $comment_approved) { } if ($should_check) { - // 立即同步执行检测 - argon_async_spam_detection_handler($comment_id); + // 异步检测(延迟 1 秒执行,让评论元数据先保存) + wp_schedule_single_event(time() + 1, 'argon_async_spam_detection', [$comment_id]); } } add_action('comment_post', 'argon_auto_detect_spam_on_comment', 10, 2);