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.
262* @since 5.5.0 The `$update` parameter accepts the value of null.263*264* @param bool|null$update Whether to update. The value of null is internally used265* to detect whether nothing has hooked into this filter.266* @param object$item The update offer.267*/268$update=apply_filters("auto_update_{$type}",$update,$item);269270if(!$update){271if('core'===$type){272$this->send_core_update_notification_email($item);273}274returnfalse;
History
Introduced in 3.7.0. Unchanged from 6.7.7 through 7.1.0.