1. 首页
  2. WordPress钩子手册

auto_core_update_send_email

apply_filters( ‘auto_core_update_send_email’, bool $send, string $type, object $core_update, mixed $result )

过滤器::过滤自动后台核心更新后是否发送电子邮件。
Filter Hook: Filters whether to send an email following an automatic background core update.

目录锚点:#参数#源码#笔记


参数(Parameters)

参数 类型 说明
$send (bool) 是否发送电子邮件。默认为真。
$type (string) 要发送的电子邮件类型。可以是“成功”、“失败”、“关键”之一。
$core_update (object) 尝试的更新提议。
$result (mixed) 核心更新的结果。可能是WP_错误。

源码(Source)


更新版本 源码位置 使用 被使用
3.7.0 wp-admin/includes/class-wp-automatic-updater.php:646 1 0

笔记(Notes)

如果这个钩子可以是每个用户的,那就太好了,例如,如果一个WP安装有多个管理员用户,而不是所有用户都希望在发生aut更新时得到通知呢?

auto_core_update_send_email 为WP2原创文章,链接:https://www.wp2.cn/hook/auto_core_update_send_email/