feat: 邮件系统优化和垃圾评论通知

- 移除所有邮件模板中的 emoji,表述正式化
- 为所有用户邮件添加退订功能支持
- 新增垃圾评论通知邮件模板(spam_notify)
- 检测到垃圾评论时自动发送邮件给评论者
- 邮件包含识别理由、AI 模型、服务提供商、识别码等信息
- 提供查询识别详情和退订链接
This commit is contained in:
2026-01-22 13:35:23 +08:00
parent 03ce925ec4
commit 4543ceb045
3 changed files with 132 additions and 4 deletions

View File

@@ -283,6 +283,7 @@ require_once(get_template_directory() . '/email-templates/base.php');
require_once(get_template_directory() . '/email-templates/comment-notify.php');
require_once(get_template_directory() . '/email-templates/reply-notify.php');
require_once(get_template_directory() . '/email-templates/feedback-notify.php');
require_once(get_template_directory() . '/email-templates/spam-notify.php');
//检测更新
require_once(get_template_directory() . '/theme-update-checker/plugin-update-checker.php');
@@ -7711,6 +7712,11 @@ function argon_async_spam_detection_handler($comment_id) {
'reason' => $result['reason'],
'action' => $auto_action
]);
// 发送垃圾评论通知邮件给评论者
if (!empty($comment->comment_author_email)) {
argon_send_spam_notify_email($comment, $result, $detection_code);
}
} else {
// 记录正常评论的检测结果
update_comment_meta($comment_id, '_argon_spam_detection_result', [