WordPress at a glance
filter is not described

auto_update_(type) filter-hook . WP 3.7.0

Filters whether to automatically update core, a plugin, a theme, or a language.

The dynamic portion of the hook name, $type, refers to the type of update being checked. Potential hook names include:

  • auto_update_core
  • auto_update_plugin
  • auto_update_theme
  • auto_update_translation

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

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.

Usage

add_filter( 'auto_update_(type)', 'filter_function_name_2406', 10, 2 );
function filter_function_name_2406( $update, $item ){
	// filter...

	return $update;
}
$update(true/false/null)
Whether to update. The value of null is internally used to detect whether nothing has hooked into this filter.
$item(object)
The update offer.

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

С версии 3.7.0 Введена.
С версии 5.5.0 The $update parameter accepts the value of null.

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

WP_Automatic_Updater::should_update()
auto_update_(type)
WP_MS_Themes_List_Table::prepare_items()
auto_update_(type)
WP_Plugins_List_Table::prepare_items()
auto_update_(type)
WP_Site_Health::detect_plugin_theme_auto_update_issues()
auto_update_(type)
WP_Debug_Data::debug_data()
auto_update_(type)
wp_prepare_themes_for_js()
auto_update_(type)
wp-admin/includes/class-wp-automatic-updater.php 204
$update = apply_filters( "auto_update_{$type}", $update, $item );
wp-admin/includes/class-wp-ms-themes-list-table.php 186
$auto_update_forced = apply_filters( "auto_update_{$type}", null, (object) $filter_payload );
wp-admin/includes/class-wp-plugins-list-table.php 236
$auto_update_forced = apply_filters( "auto_update_{$type}", null, $filter_payload );
wp-admin/includes/class-wp-site-health.php 2386
$test_plugins_enabled = apply_filters( "auto_update_{$type}", true, $mock_plugin );
wp-admin/includes/class-wp-site-health.php 2390
$test_themes_enabled = apply_filters( "auto_update_{$type}", true, $mock_theme );
wp-admin/includes/class-wp-debug-data.php 982
$auto_update_forced = apply_filters( "auto_update_{$type}", null, (object) $item );
wp-admin/includes/class-wp-debug-data.php 1126
$auto_update_forced = apply_filters( "auto_update_{$type}", null, (object) $item );
wp-admin/includes/class-wp-debug-data.php 1214
$auto_update_forced = apply_filters( "auto_update_{$type}", null, (object) $item );
wp-admin/includes/class-wp-debug-data.php 1304
$auto_update_forced = apply_filters( "auto_update_{$type}", null, (object) $item );
wp-admin/includes/theme.php 721
$auto_update_forced = apply_filters( "auto_update_{$type}", null, $auto_update_filter_payload );

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

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