Changeset 49241
- Timestamp:
- 10/20/2020 05:37:16 PM (5 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 6 edited
-
class-wp-debug-data.php (modified) (5 diffs)
-
class-wp-ms-themes-list-table.php (modified) (1 diff)
-
class-wp-plugins-list-table.php (modified) (1 diff)
-
class-wp-site-health.php (modified) (1 diff)
-
theme.php (modified) (1 diff)
-
update.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-debug-data.php
r48802 r49241 978 978 } 979 979 980 $type = 'plugin'; 981 /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ 982 $auto_update_forced = apply_filters( "auto_update_{$type}", null, (object) $item ); 980 $auto_update_forced = wp_is_auto_update_forced_for_item( 'plugin', null, (object) $item ); 983 981 984 982 if ( ! is_null( $auto_update_forced ) ) { … … 1122 1120 } 1123 1121 1124 $type = 'theme'; 1125 /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ 1126 $auto_update_forced = apply_filters( "auto_update_{$type}", null, (object) $item ); 1122 $auto_update_forced = wp_is_auto_update_forced_for_item( 'theme', null, (object) $item ); 1127 1123 1128 1124 if ( ! is_null( $auto_update_forced ) ) { … … 1210 1206 } 1211 1207 1212 $type = 'theme'; 1213 /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ 1214 $auto_update_forced = apply_filters( "auto_update_{$type}", null, (object) $item ); 1208 $auto_update_forced = wp_is_auto_update_forced_for_item( 'theme', null, (object) $item ); 1215 1209 1216 1210 if ( ! is_null( $auto_update_forced ) ) { … … 1300 1294 } 1301 1295 1302 $type = 'theme'; 1303 /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ 1304 $auto_update_forced = apply_filters( "auto_update_{$type}", null, (object) $item ); 1296 $auto_update_forced = wp_is_auto_update_forced_for_item( 'theme', null, (object) $item ); 1305 1297 1306 1298 if ( ! is_null( $auto_update_forced ) ) { … … 1328 1320 1329 1321 $theme_version_string .= ' | ' . $auto_updates_string; 1330 $theme_version_string_debug .= ', ' . $auto_updates_string;1322 $theme_version_string_debug .= ', ' . $auto_updates_string; 1331 1323 } 1332 1324 -
trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php
r49108 r49241 182 182 $filter_payload = array_merge( $filter_payload, array_intersect_key( $theme_data, $filter_payload ) ); 183 183 184 $type = 'theme'; 185 /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ 186 $auto_update_forced = apply_filters( "auto_update_{$type}", null, (object) $filter_payload ); 184 $auto_update_forced = wp_is_auto_update_forced_for_item( 'theme', null, $filter_payload ); 187 185 188 186 if ( ! is_null( $auto_update_forced ) ) { -
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r48968 r49241 230 230 'compatibility' => new stdClass(), 231 231 ); 232 232 233 $filter_payload = (object) array_merge( $filter_payload, array_intersect_key( $plugin_data, $filter_payload ) ); 233 234 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 ); 235 $auto_update_forced = wp_is_auto_update_forced_for_item( 'plugin', null, $filter_payload ); 237 236 238 237 if ( ! is_null( $auto_update_forced ) ) { -
trunk/src/wp-admin/includes/class-wp-site-health.php
r49237 r49241 2399 2399 ); 2400 2400 2401 $type = 'plugin'; 2402 /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ 2403 $test_plugins_enabled = apply_filters( "auto_update_{$type}", true, $mock_plugin ); 2404 2405 $type = 'theme'; 2406 /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ 2407 $test_themes_enabled = apply_filters( "auto_update_{$type}", true, $mock_theme ); 2401 $test_plugins_enabled = wp_is_auto_update_forced_for_item( 'plugin', true, $mock_plugin ); 2402 $test_themes_enabled = wp_is_auto_update_forced_for_item( 'theme', true, $mock_theme ); 2408 2403 2409 2404 $ui_enabled_for_plugins = wp_is_auto_update_enabled_for_type( 'plugin' ); -
trunk/src/wp-admin/includes/theme.php
r49011 r49241 717 717 } 718 718 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 ); 719 $auto_update_forced = wp_is_auto_update_forced_for_item( 'theme', null, $auto_update_filter_payload ); 722 720 723 721 $prepared_themes[ $slug ] = array( -
trunk/src/wp-admin/includes/update.php
r49108 r49241 1047 1047 1048 1048 /** 1049 * Checks whether auto-updates are forced for an item. 1050 * 1051 * @since 5.6.0 1052 * 1053 * @param string $type The type of update being checked: 'theme' or 'plugin'. 1054 * @param bool|null $update Whether to update. The value of null is internally used 1055 * to detect whether nothing has hooked into this filter. 1056 * @param object $item The update offer. 1057 * @return bool True if auto-updates are forced for `$item`, false otherwise. 1058 */ 1059 function wp_is_auto_update_forced_for_item( $type, $update, $item ) { 1060 /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */ 1061 return apply_filters( "auto_update_{$type}", $update, $item ); 1062 } 1063 1064 /** 1049 1065 * Determines the appropriate auto-update message to be displayed. 1050 1066 *
Note: See TracChangeset
for help on using the changeset viewer.