在自动更新之前立即触发。
原型
do_action( 'pre_auto_update', string $type, object $item, string $context )
参数
$type
(string)
正在检查的更新类型:“核心”,“主题”,“插件”或“翻译”。
$item
(object)
更新优惠。
$context
(string)
应检查文件系统访问和状态的文件系统上下文(路径)。
源文件
路径:wp-admin/includes/class-wp-automatic-updater.php
其他
英文文档:https://developer.wordpress.org/reference/hooks/pre_auto_update/