send_site_admin_email_change_email
云策文档标注
概述
send_site_admin_email_change_email 是一个 WordPress 过滤器钩子,用于控制是否发送站点管理员邮箱变更通知邮件。开发者可以通过此钩子自定义邮件发送逻辑。
关键要点
- 这是一个过滤器钩子,用于干预站点管理员邮箱变更时的邮件通知发送行为。
- 钩子接收三个参数:$send(布尔值,决定是否发送邮件)、$old_email(旧邮箱地址)、$new_email(新邮箱地址)。
- 钩子首次在 WordPress 4.9.0 版本中引入。
代码示例
$send = apply_filters( 'send_site_admin_email_change_email', $send, $old_email, $new_email );注意事项
此钩子与 wp_site_admin_email_change_notification() 函数关联,该函数在站点管理员邮箱变更时向旧邮箱地址发送邮件。
原文内容
Filters whether to send the site admin email change notification email.
Parameters
$sendbool-
Whether to send the email notification.
$old_emailstring-
The old site admin email address.
$new_emailstring-
The new site admin email address.
Source
$send = apply_filters( 'send_site_admin_email_change_email', $send, $old_email, $new_email );
Changelog
| Version | Description |
|---|---|
| 4.9.0 | Introduced. |