allow_major_auto_core_updates
云策文档标注
概述
allow_major_auto_core_updates 是一个 WordPress 过滤器,用于控制是否启用主要核心版本的自动更新。开发者可以通过此 Hook 自定义更新行为。
关键要点
- 过滤器名称:allow_major_auto_core_updates
- 参数:$upgrade_major(布尔值),表示是否启用主要自动核心更新
- 返回值:应用过滤器后的布尔值
- 引入版本:WordPress 3.7.0
相关函数
- core_auto_updates_settings():显示 WordPress 自动更新设置
- Core_Upgrader::should_update_to_version():确定 WordPress 核心版本是否应更新到提供的版本
原文内容
Filters whether to enable major automatic core updates.
Parameters
$upgrade_majorbool-
Whether to enable major automatic core updates.
Source
return apply_filters( 'allow_major_auto_core_updates', $upgrade_major );
Changelog
| Version | Description |
|---|---|
| 3.7.0 | Introduced. |