钩子文档

wp_privacy_personal_data_email_subject

💡 云策文档标注

概述

wp_privacy_personal_data_email_subject 是一个 WordPress 过滤器,用于修改个人数据导出请求完成时发送的邮件主题。它允许开发者自定义邮件主题内容,基于站点名称和邮件数据等参数。

关键要点

  • 过滤器名称:wp_privacy_personal_data_email_subject
  • 主要用途:过滤个人数据导出邮件的主题
  • 参数:$subject(邮件主题字符串)、$sitename(站点名称字符串)、$email_data(邮件数据数组)
  • 相关函数:wp_privacy_send_personal_data_export_email()
  • 引入版本:WordPress 5.3.0

📄 原文内容

Filters the subject of the email sent when an export request is completed.

Parameters

$subjectstring
The email subject.
$sitenamestring
The name of the site.
$email_dataarray
Data relating to the account action email.

  • request WP_User_Request
    User request object.
  • expiration int
    The time in seconds until the export file expires.
  • expiration_date string
    The localized date and time when the export file expires.
  • 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 wp_privacy_personal_data_email_to filter.
  • export_file_url string
    The export file URL.
  • sitename string
    The site name sending the mail.
  • siteurl string
    The site URL sending the mail.

Source

$subject = apply_filters( 'wp_privacy_personal_data_email_subject', $subject, $site_name, $email_data );

Changelog

Version Description
5.3.0 Introduced.