WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
2368 | 'new_version' => '9.9', |
2369 | 'url' => 'https://wordpress.org/themes/a-fake-theme/', |
2370 | 'package' => 'https://downloads.wordpress.org/theme/a-fake-theme.9.9.zip', |
2371 | 'requires' => '5.0.0', |
2372 | 'requires_php' => '5.6.20', |
2373 | ); |
2374 |
|
2375 | $type = 'plugin'; |
2376 | /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
2377 | $test_plugins_enabled = apply_filters( "auto_update_{$type}", true, $mock_plugin ); |
2378 |
|
2379 | $type = 'theme'; |
2380 | /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
2381 | $test_themes_enabled = apply_filters( "auto_update_{$type}", true, $mock_theme ); |
2382 |
|
2383 | $ui_enabled_for_plugins = wp_is_auto_update_enabled_for_type( 'plugin' ); |
2384 | $ui_enabled_for_themes = wp_is_auto_update_enabled_for_type( 'theme' ); |
2385 | $plugin_filter_present = has_filter( 'auto_update_plugin' ); |
2386 | $theme_filter_present = has_filter( 'auto_update_theme' ); |
2387 |
|
2388 | if ( ( ! $test_plugins_enabled && $ui_enabled_for_plugins ) |
2389 | || ( ! $test_themes_enabled && $ui_enabled_for_themes ) |
2390 | ) { |