apply_filters( "auto_update_{$type}", bool|null $update, object $item )
Filters whether to automatically update core, a plugin, a theme, or a language.
Description
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
Generally speaking, plugins, themes, and major core versions are not updated by default, while translations and minor and development versions for core are updated by default.
See the ‘allow_dev_auto_core_updates’, ‘allow_minor_auto_core_updates’, and ‘allow_major_auto_core_updates’ filters for a more straightforward way to adjust core updates.
Parameters
- $update
-
(bool|null) Whether to update. The value of null is internally used to detect whether nothing has hooked into this filter.
- $item
-
(object) The update offer.
Source
Changelog
Version | Description |
---|---|
5.5.0 | The $update parameter accepts the value of null. |
3.7.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/auto_update_type