automatic_updater_disabled
Filters whether to entirely disable background updates.
There are more fine-grained filters and controls for selective disabling. This filter parallels the AUTOMATIC_UPDATER_DISABLED constant in name.
This also disables update notification emails. That may change in the future.
Usage
add_filter( 'automatic_updater_disabled', 'wp_kama_automatic_updater_disabled_filter' ); /** * Function for `automatic_updater_disabled` filter-hook. * * @param bool $disabled Whether the updater should be disabled. * * @return bool */ function wp_kama_automatic_updater_disabled_filter( $disabled ){ // filter... return $disabled; }
- $disabled(true|false)
- Whether the updater should be disabled.
Changelog
Since 3.7.0 | Introduced. |
Where the hook is called
automatic_updater_disabled
automatic_updater_disabled
wp-admin/includes/class-wp-automatic-updater.php 58
return apply_filters( 'automatic_updater_disabled', $disabled );
wp-admin/includes/class-wp-site-health-auto-updates.php 118
if ( apply_filters( 'automatic_updater_disabled', false ) ) {