wpmu_signup_blog_notification_email
云策文档标注
概述
wpmu_signup_blog_notification_email 是一个 WordPress 过滤器钩子,用于修改新博客通知邮件的消息内容。该钩子在多站点环境中使用,允许开发者自定义发送给用户的站点激活邮件内容。
关键要点
- 这是一个过滤器钩子,用于过滤新博客通知邮件的消息内容。
- 内容应格式化为适合通过 wp_mail() 函数传输。
- 钩子接收多个参数,包括站点域名、路径、标题、用户登录名、邮箱、激活键和元数据。
- 默认消息包含激活链接和新站点 URL,使用占位符 %1$s 和 %2$s。
- 钩子由 wpmu_signup_blog_notification() 函数调用,用于发送站点注册确认邮件。
- 自 WordPress MU 3.0.0 版本引入。
代码示例
apply_filters(
'wpmu_signup_blog_notification_email',
__( "To activate your site, please click the following link:nn%1$snnAfter you activate, you will receive *another email* with your login.nnAfter you activate, you can visit your site here:nn%2$s" ),
$domain,
$path,
$title,
$user_login,
$user_email,
$key,
$meta
)
原文内容
Filters the message content of the new blog notification email.
Description
Content should be formatted for transmission via wp_mail() .
Parameters
$contentstring-
Content of the notification email.
$domainstring-
Site domain.
$pathstring-
Site path.
$titlestring-
Site title.
$user_loginstring-
User login name.
$user_emailstring-
User email address.
$keystring-
Activation key created in wpmu_signup_blog() .
$metaarray-
Signup meta data. By default, contains the requested privacy setting and lang_id.
Source
apply_filters(
'wpmu_signup_blog_notification_email',
/* translators: New site notification email. 1: Activation URL, 2: New site URL. */
__( "To activate your site, please click the following link:nn%1$snnAfter you activate, you will receive *another email* with your login.nnAfter you activate, you can visit your site here:nn%2$s" ),
$domain,
$path,
$title,
$user_login,
$user_email,
$key,
$meta
),
Changelog
| Version | Description |
|---|---|
| MU (3.0.0) | Introduced. |