钩子文档

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.

  • request WP_User_Request
    User request object.
  • user_email string
    The email address confirming a request.
  • description string
    Description of the action being performed so the user knows what the email is for.
  • manage_url string
    The link to click manage privacy requests of this type.
  • sitename string
    The site name sending the mail.
  • siteurl string
    The site URL sending the mail.
  • admin_email string
    The 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.