diff --git src/wp-admin/includes/class-wp-automatic-updater.php src/wp-admin/includes/class-wp-automatic-updater.php
index a20bf42bc6..f266afc2c3 100644
|
|
|
class WP_Automatic_Updater { |
| 179 | 179 | * Filters whether to automatically update core, a plugin, a theme, or a language. |
| 180 | 180 | * |
| 181 | 181 | * The dynamic portion of the hook name, `$type`, refers to the type of update |
| 182 | | * being checked. Can be 'core', 'theme', 'plugin', or 'translation'. |
| | 182 | * being checked. Potential hook names include: |
| | 183 | * |
| | 184 | * - `auto_update_core` |
| | 185 | * - `auto_update_plugin` |
| | 186 | * - `auto_update_theme` |
| | 187 | * - `auto_update_translation` |
| 183 | 188 | * |
| 184 | 189 | * Generally speaking, plugins, themes, and major core versions are not updated |
| 185 | 190 | * by default, while translations and minor and development versions for core |
diff --git src/wp-admin/includes/class-wp-debug-data.php src/wp-admin/includes/class-wp-debug-data.php
index 2f438fb363..1a93c7e1f9 100644
|
|
|
class WP_Debug_Data { |
| 971 | 971 | $item = (object) array_merge( $item, array_intersect_key( $plugin, $item ) ); |
| 972 | 972 | } |
| 973 | 973 | |
| 974 | | /** This action is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| 975 | | $auto_update_forced = apply_filters( 'auto_update_plugin', null, $item ); |
| | 974 | $type = 'plugin'; |
| | 975 | /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| | 976 | $auto_update_forced = apply_filters( "auto_update_{$type}", null, $item ); |
| 976 | 977 | |
| 977 | 978 | if ( ! is_null( $auto_update_forced ) ) { |
| 978 | 979 | $enabled = $auto_update_forced; |
| … |
… |
class WP_Debug_Data { |
| 1114 | 1115 | ); |
| 1115 | 1116 | } |
| 1116 | 1117 | |
| 1117 | | /** This action is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| 1118 | | $auto_update_forced = apply_filters( 'auto_update_theme', null, $item ); |
| | 1118 | $type = 'theme'; |
| | 1119 | /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| | 1120 | $auto_update_forced = apply_filters( "auto_update_{$type}", null, $item ); |
| 1119 | 1121 | |
| 1120 | 1122 | if ( ! is_null( $auto_update_forced ) ) { |
| 1121 | 1123 | $enabled = $auto_update_forced; |
| … |
… |
class WP_Debug_Data { |
| 1201 | 1203 | ); |
| 1202 | 1204 | } |
| 1203 | 1205 | |
| 1204 | | /** This action is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| 1205 | | $auto_update_forced = apply_filters( 'auto_update_theme', null, $item ); |
| | 1206 | $type = 'theme'; |
| | 1207 | /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| | 1208 | $auto_update_forced = apply_filters( "auto_update_{$type}", null, $item ); |
| 1206 | 1209 | |
| 1207 | 1210 | if ( ! is_null( $auto_update_forced ) ) { |
| 1208 | 1211 | $enabled = $auto_update_forced; |
| … |
… |
class WP_Debug_Data { |
| 1290 | 1293 | ); |
| 1291 | 1294 | } |
| 1292 | 1295 | |
| 1293 | | /** This action is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| 1294 | | $auto_update_forced = apply_filters( 'auto_update_theme', null, $item ); |
| | 1296 | $type = 'theme'; |
| | 1297 | /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| | 1298 | $auto_update_forced = apply_filters( "auto_update_{$type}", null, $item ); |
| 1295 | 1299 | |
| 1296 | 1300 | if ( ! is_null( $auto_update_forced ) ) { |
| 1297 | 1301 | $enabled = $auto_update_forced; |
diff --git src/wp-admin/includes/class-wp-plugins-list-table.php src/wp-admin/includes/class-wp-plugins-list-table.php
index ff7a90b222..b90cab9c43 100644
|
|
|
class WP_Plugins_List_Table extends WP_List_Table { |
| 231 | 231 | ); |
| 232 | 232 | $filter_payload = (object) array_merge( $filter_payload, array_intersect_key( $plugin_data, $filter_payload ) ); |
| 233 | 233 | |
| 234 | | /** This action is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| 235 | | $auto_update_forced = apply_filters( 'auto_update_plugin', null, $filter_payload ); |
| | 234 | $type = 'plugin'; |
| | 235 | /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| | 236 | $auto_update_forced = apply_filters( "auto_update_{$type}", null, $filter_payload ); |
| 236 | 237 | if ( ! is_null( $auto_update_forced ) ) { |
| 237 | 238 | $plugin_data['auto-update-forced'] = $auto_update_forced; |
| 238 | 239 | } |
diff --git src/wp-admin/includes/class-wp-site-health.php src/wp-admin/includes/class-wp-site-health.php
index f20bc947c3..865b786139 100644
|
|
|
class WP_Site_Health { |
| 2372 | 2372 | 'requires_php' => '5.6.20', |
| 2373 | 2373 | ); |
| 2374 | 2374 | |
| | 2375 | $type = 'plugin'; |
| 2375 | 2376 | /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| 2376 | | $test_plugins_enabled = apply_filters( 'auto_update_plugin', true, $mock_plugin ); |
| | 2377 | $test_plugins_enabled = apply_filters( "auto_update_{$type}", true, $mock_plugin ); |
| | 2378 | |
| | 2379 | $type = 'theme'; |
| 2377 | 2380 | /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| 2378 | | $test_themes_enabled = apply_filters( 'auto_update_theme', true, $mock_theme ); |
| | 2381 | $test_themes_enabled = apply_filters( "auto_update_{$type}", true, $mock_theme ); |
| | 2382 | |
| 2379 | 2383 | $ui_enabled_for_plugins = wp_is_auto_update_enabled_for_type( 'plugin' ); |
| 2380 | 2384 | $ui_enabled_for_themes = wp_is_auto_update_enabled_for_type( 'theme' ); |
| 2381 | 2385 | $plugin_filter_present = has_filter( 'auto_update_plugin' ); |
diff --git src/wp-admin/includes/theme.php src/wp-admin/includes/theme.php
index 67d557096c..21730339cd 100644
|
|
|
function wp_prepare_themes_for_js( $themes = null ) { |
| 716 | 716 | ); |
| 717 | 717 | } |
| 718 | 718 | |
| 719 | | /** This action is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| 720 | | $auto_update_forced = apply_filters( 'auto_update_theme', null, $auto_update_filter_payload ); |
| | 719 | $type = 'theme'; |
| | 720 | /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ |
| | 721 | $auto_update_forced = apply_filters( "auto_update_{$type}", null, $auto_update_filter_payload ); |
| 721 | 722 | |
| 722 | 723 | $prepared_themes[ $slug ] = array( |
| 723 | 724 | 'id' => $slug, |