钩子文档

comment_moderation_headers

💡 云策文档标注

概述

comment_moderation_headers 是一个 WordPress 过滤器,用于修改评论审核邮件的头部信息。它允许开发者自定义邮件头,如发件人、主题等,以增强邮件功能或适配特定需求。

关键要点

  • 过滤器名称:comment_moderation_headers
  • 参数:$message_headers(字符串,评论审核邮件的头部信息)和 $comment_id(整数,评论 ID)
  • 相关函数:在 wp_notify_moderator() 中被调用,用于通知站点管理员有待审核的评论
  • 引入版本:WordPress 2.8.0

📄 原文内容

Filters the comment moderation email headers.

Parameters

$message_headersstring
Headers for the comment moderation email.
$comment_idint
Comment ID.

Source

$message_headers = apply_filters( 'comment_moderation_headers', $message_headers, $comment_id );

Changelog

Version Description
2.8.0 Introduced.