auto_update_{$type}
过滤钩子
apply_filters( "auto_update_{$type}", $update, $item )
- 参数
-
-
(bool|null)
$update
Whether to update. The value of null is internally used
to detect whether nothing has hooked into this filter.- Required: 是
-
(object)
$item
The update offer.- Required: 是
-
(bool|null)
- 定义位置
-
-
wp-admin/includes/class-wp-automatic-updater.php
, line 213
-
wp-admin/includes/class-wp-automatic-updater.php
- 引入
- 5.5.0
- 弃用
- –
Filters whether to automatically update core, a plugin, a theme, or a language.
The dynamic portion of the hook name, $type
, refers to the type of update
being checked.
Possible hook names include:
auto_update_core
auto_update_plugin
auto_update_theme
auto_update_translation
Since WordPress 3.7, minor and development versions of core, and translations have
been auto-updated by default. New installs on WordPress 5.6 or higher will also
auto-update major versions by default. Starting in 5.6, older sites can opt-in to
major version auto-updates, and auto-updates for plugins and themes.
See the {@see ‘allow_dev_auto_core_updates’}, {@see ‘allow_minor_auto_core_updates’},
and {@see ‘allow_major_auto_core_updates’} filters for a more straightforward way to
adjust core updates.
$update = apply_filters( "auto_update_{$type}", $update, $item );
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。