On this page
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_coreauto_update_pluginauto_update_themeauto_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 ‘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
$updatebool|null-
Whether to update. The value of null is internally used to detect whether nothing has hooked into this filter.
$itemobject-
The update offer.
Source
File: wp-admin/includes/class-wp-automatic-updater.php. View all references
$update = apply_filters( "auto_update_{$type}", $update, $item );
Related
Used By
| Used By | Description |
|---|---|
| wp_is_auto_update_forced_for_item() wp-admin/includes/update.php | Checks whether auto-updates are forced for an item. |
| WP_Automatic_Updater::should_update() wp-admin/includes/class-wp-automatic-updater.php | Tests to see if we can and should update a specific item. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/auto_update_type