wpmu_signup_user_notification_email
云策文档标注
概述
wpmu_signup_user_notification_email 是一个 WordPress 过滤器,用于自定义新用户注册时的通知邮件内容。它允许开发者修改邮件正文,确保内容适合通过 wp_mail() 发送。
关键要点
- 过滤器名称:wpmu_signup_user_notification_email
- 用途:过滤新用户注册通知邮件的文本内容
- 参数:$content(邮件内容字符串)、$user_login(用户登录名)、$user_email(用户邮箱地址)、$key(激活密钥)、$meta(注册元数据数组)
- 默认内容:包含激活链接的翻译字符串,提示用户点击激活
- 相关函数:wpmu_signup_user_notification() 用于发送确认请求邮件
- 引入版本:WordPress MU 3.0.0
代码示例
apply_filters(
'wpmu_signup_user_notification_email',
/* translators: New user notification email. %s: Activation URL. */
__( "To activate your user, please click the following link:nn%snnAfter you activate, you will receive *another email* with your login." ),
$user_login,
$user_email,
$key,
$meta
)
原文内容
Filters the content of the notification email for new user sign-up.
Description
Content should be formatted for transmission via wp_mail() .
Parameters
$contentstring-
Content of the notification email.
$user_loginstring-
User login name.
$user_emailstring-
User email address.
$keystring-
Activation key created in wpmu_signup_user() .
$metaarray-
Signup meta data. Default empty array.
Source
apply_filters(
'wpmu_signup_user_notification_email',
/* translators: New user notification email. %s: Activation URL. */
__( "To activate your user, please click the following link:nn%snnAfter you activate, you will receive *another email* with your login." ),
$user_login,
$user_email,
$key,
$meta
),
Changelog
| Version | Description |
|---|---|
| MU (3.0.0) | Introduced. |