new_site_email

过滤钩子
apply_filters( 'new_site_email', $new_site_email, $site, $user )
参数
  • (array) $new_site_email { Used to build wp_mail(). @type string $to The email address of the recipient. @type string $subject The subject of the email. @type string $message The content of the email. @type string $headers Headers. }
    Required:
  • (WP_Site) $site Site object of the new site.
    Required:
  • (WP_User) $user User object of the administrator of the new site.
    Required:
定义位置
相关勾子
send_new_site_emailpre_user_emailsite_detailswp_installed_emailnetwork_site_url
相关方法
sanitize_emailget_site_metanetwork_site_urlvalidate_emailis_emailget_site_url
引入
5.6.0
弃用
-

new_site_email: 这个过滤钩子用于修改在多站点网络中创建新站点时发送的电子邮件的收件人和其他信息。

在创建新站点时过滤发送给多站点网络管理员的电子邮件内容。

内容应格式化为通过wp_mail()传输。

$new_site_email = apply_filters( 'new_site_email', $new_site_email, $site, $user );

常见问题

FAQs
查看更多 >