钩子文档

user_erasure_fulfillment_email_headers

💡 云策文档标注

概述

user_erasure_fulfillment_email_headers 是一个 WordPress 过滤器,用于修改数据擦除完成通知邮件的头部信息。它允许开发者在发送通知邮件时自定义邮件头,如发件人、回复地址等。

关键要点

  • 过滤器名称:user_erasure_fulfillment_email_headers
  • 主要用途:过滤数据擦除完成通知邮件的头部
  • 相关函数:_wp_privacy_send_erasure_fulfillment_notification()
  • 引入版本:5.8.0

参数说明

  • $headers:邮件头部,可以是字符串或数组
  • $subject:邮件主题
  • $content:邮件内容
  • $request_id:请求 ID
  • $email_data:与账户操作邮件相关的数据数组
  • $request:WP_User_Request 用户请求对象
  • $message_recipient:邮件收件人地址,默认为 $request->email,可通过 user_erasure_fulfillment_email_to 过滤器修改
  • $privacy_policy_url:隐私政策 URL
  • $sitename:发送邮件的站点名称
  • $siteurl:发送邮件的站点 URL

代码示例

$headers = apply_filters( 'user_erasure_fulfillment_email_headers', $headers, $subject, $content, $request_id, $email_data );

📄 原文内容

Filters the headers of the data erasure fulfillment notification.

Parameters

$headersstring|array
The email headers.
$subjectstring
The email subject.
$contentstring
The email content.
$request_idint
The request ID.
$email_dataarray
Data relating to the account action email.

  • request WP_User_Request
    User request object.
  • message_recipient string
    The address that the email will be sent to. Defaults to the value of $request->email, but can be changed by the user_erasure_fulfillment_email_to filter.
  • privacy_policy_url string
    Privacy policy URL.
  • sitename string
    The site name sending the mail.
  • siteurl string
    The site URL sending the mail.

Source

$headers = apply_filters( 'user_erasure_fulfillment_email_headers', $headers, $subject, $content, $request_id, $email_data );

Changelog

Version Description
5.8.0 Introduced.