user_erasure_complete_email_subject
云策文档标注
概述
user_erasure_complete_email_subject 是一个 WordPress 过滤器钩子,用于修改用户数据擦除请求完成时发送的邮件主题。该钩子已在 5.8.0 版本中被弃用,建议使用替代钩子。
关键要点
- 过滤器钩子:user_erasure_complete_email_subject,用于过滤邮件主题字符串。
- 参数:包括 $subject(邮件主题)、$sitename(站点名称)、$email_data(邮件相关数据数组)等。
- 弃用状态:自 WordPress 5.8.0 起被弃用,推荐使用 user_erasure_fulfillment_email_subject 作为替代。
- 相关函数:与 _wp_privacy_send_erasure_fulfillment_notification() 函数关联,用于通知用户擦除请求已完成。
代码示例
$subject = apply_filters_deprecated(
'user_erasure_complete_email_subject',
array( $subject, $email_data['sitename'], $email_data ),
'5.8.0',
'user_erasure_fulfillment_email_subject'
);注意事项
- 该钩子已弃用,新开发中应避免使用,转而使用 user_erasure_fulfillment_email_subject。
- 参数 $email_data 包含站点名称、隐私政策 URL 等数据,可用于自定义邮件主题。
原文内容
Filters the subject of the email sent when an erasure request is completed.
Parameters
$subjectstring-
The email subject.
$sitenamestring-
The name of the site.
$email_dataarray-
Data relating to the account action email.
requestWP_User_RequestUser request object.message_recipientstringThe address that the email will be sent to. Defaults to the value of$request->email, but can be changed by theuser_erasure_fulfillment_email_tofilter.privacy_policy_urlstringPrivacy policy URL.sitenamestringThe site name sending the mail.siteurlstringThe site URL sending the mail.
Source
$subject = apply_filters_deprecated(
'user_erasure_complete_email_subject',
array( $subject, $email_data['sitename'], $email_data ),
'5.8.0',
'user_erasure_fulfillment_email_subject'
);
Changelog
| Version | Description |
|---|---|
| 5.8.0 | Deprecated. Use ‘user_erasure_fulfillment_email_subject’ instead. |
| 4.9.8 | Introduced. |