钩子文档

user_confirmed_action_email_content

💡 云策文档标注

概述

user_confirmed_action_email_content 是一个已弃用的过滤器,用于自定义数据擦除完成通知邮件的正文内容。该邮件在管理员完成用户数据擦除请求时发送给用户。

关键要点

  • 过滤器用于修改数据擦除完成通知邮件的正文内容。
  • 邮件中包含动态替换的占位符,如 ###SITENAME###、###PRIVACY_POLICY_URL### 和 ###SITEURL###。
  • 参数包括 $content(邮件内容字符串)、$email_data(数组,包含账户操作邮件相关数据)、request(WP_User_Request 对象)、message_recipient(收件人地址)、privacy_policy_url(隐私政策 URL)、sitename(站点名称)和 siteurl(站点 URL)。
  • 自 WordPress 5.8.0 起已弃用,建议使用 user_erasure_fulfillment_email_content 或 user_request_confirmed_email_content 替代。

注意事项

  • 此过滤器已弃用,新开发中应避免使用,改用推荐的替代过滤器。
  • 确保正确处理动态占位符的替换,以保持邮件内容的完整性。

📄 原文内容

Filters the body of the data erasure fulfillment notification.

Description

The email is sent to a user when their data erasure request is fulfilled by an administrator.

The following strings have a special meaning and will get replaced dynamically:

  • ###SITENAME### The name of the site.
  • ###PRIVACY_POLICY_URL### Privacy policy page URL.
  • ###SITEURL### The URL to the site.

Parameters

$contentstring
The email content.
$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

$content = apply_filters_deprecated(
	'user_confirmed_action_email_content',
	array( $content, $email_data ),
	'5.8.0',
	sprintf(
		/* translators: 1 & 2: Deprecation replacement options. */
		__( '%1$s or %2$s' ),
		'user_erasure_fulfillment_email_content',
		'user_request_confirmed_email_content'
	)
);

Changelog

Version Description
5.8.0 Deprecated. Use ‘user_erasure_fulfillment_email_content’ instead.
For user request confirmation email content use ‘user_request_confirmed_email_content’ instead.
4.9.6 Introduced.