apply_filters( "auto_update_{$type}", bool|null $update, object $item )
- Since
- 3.7.0, 5.5.0
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: <ul> <li>auto_update_core</li> <li>auto_update_plugin</li> <li>auto_update_theme</li> <li>auto_update_translation</li> </ul> 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.
Fired at · 2
wp-admin/includes/class-wp-automatic-updater.php:268WP_Automatic_Updater::should_update()wp-admin/includes/update.php:1089wp_is_auto_update_forced_for_item()
Source
* @since 5.5.0 The `$update` parameter accepts the value of null. * * @param bool|null $update Whether to update. The value of null is internally used * to detect whether nothing has hooked into this filter. * @param object $item The update offer. */ $update = apply_filters( "auto_update_{$type}", $update, $item ); if ( ! $update ) { if ( 'core' === $type ) { $this->send_core_update_notification_email( $item ); } return false;History
Introduced in 3.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
5.5.0
The
$update parameter accepts the value of null.from the docblock3.7.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.