automatic_updater_disabled хук-фильтрWP 3.7.0

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.

Использование

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.

Список изменений

С версии 3.7.0 Введена.

Где вызывается хук

WP_Automatic_Updater::is_disabled()
automatic_updater_disabled
WP_Site_Health_Auto_Updates::test_filters_automatic_updater_disabled()
automatic_updater_disabled
wp-admin/includes/class-wp-automatic-updater.php 56
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 ) ) {

Где используется хук в WordPress

Использование не найдено.