feat: 邮件系统优化和垃圾评论通知
- 移除所有邮件模板中的 emoji,表述正式化 - 为所有用户邮件添加退订功能支持 - 新增垃圾评论通知邮件模板(spam_notify) - 检测到垃圾评论时自动发送邮件给评论者 - 邮件包含识别理由、AI 模型、服务提供商、识别码等信息 - 提供查询识别详情和退订链接
This commit is contained in:
@@ -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', [
|
||||
|
||||
Reference in New Issue
Block a user