apply_filters( "auto_update_{$type}", bool $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. Can be ‘core’, ‘theme’, ‘plugin’, or ‘translation’.

Generally speaking, plugins, themes, and major core versions are not updated by default, while translations and minor, patch, and nightly versions for core are updated by default.

See the ‘allow_dev_auto_core_updates’, ‘allow_nightly_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) Whether to update.

$item

(object) The update offer.


Source

File: wp-admin/includes/class-wp-automatic-updater.php

View on GitHub



Changelog

Changelog
Version Description
1.0.0 Added filter for ClassicPress nightly updates.
WP-3.7.0 Introduced.