user_request_confirmed_email_headers
云策文档标注
概述
user_request_confirmed_email_headers 是一个 WordPress 过滤器钩子,用于修改用户请求确认邮件的头部信息。它允许开发者在发送确认邮件时自定义邮件头,如发件人、收件人、主题等。
关键要点
- 这是一个过滤器钩子,用于过滤用户请求确认邮件的头部。
- 参数包括 $headers(邮件头)、$subject(邮件主题)、$content(邮件内容)、$request_id(请求ID)和 $email_data(邮件相关数据)。
- 相关函数 _wp_privacy_send_request_confirmation_notification() 在 wp-includes/user.php 中,用于在请求确认时通过邮件通知站点管理员。
- 自 WordPress 5.4.0 版本引入。
原文内容
Filters the headers of the user request confirmation email.
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.
requestWP_User_RequestUser request object.user_emailstringThe email address confirming a request.descriptionstringDescription of the action being performed so the user knows what the email is for.manage_urlstringThe link to click manage privacy requests of this type.sitenamestringThe site name sending the mail.siteurlstringThe site URL sending the mail.admin_emailstringThe administrator email receiving the mail.
Source
$headers = apply_filters( 'user_request_confirmed_email_headers', $headers, $subject, $content, $request_id, $email_data );
Changelog
| Version | Description |
|---|---|
| 5.4.0 | Introduced. |