Ticket #37731: 37731.5.patch
File 37731.5.patch, 5.9 KB (added by , 9 years ago) |
---|
-
src/wp-admin/includes/admin-filters.php
116 116 117 117 // Upgrade hooks. 118 118 add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 ); 119 add_action( 'upgrader_process_complete', 'wp_version_check ', 10, 0);120 add_action( 'upgrader_process_complete', 'wp_update_plugins ', 10, 0);121 add_action( 'upgrader_process_complete', 'wp_update_themes ', 10, 0);119 add_action( 'upgrader_process_complete', 'wp_version_check_upc', 10, 2 ); 120 add_action( 'upgrader_process_complete', 'wp_update_plugins_upc', 10, 2 ); 121 add_action( 'upgrader_process_complete', 'wp_update_themes_upc', 10, 2 ); -
src/wp-admin/includes/class-language-pack-upgrader.php
268 268 269 269 // Remove upgrade hooks which are not required for translation updates. 270 270 remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 ); 271 remove_action( 'upgrader_process_complete', 'wp_version_check ');272 remove_action( 'upgrader_process_complete', 'wp_update_plugins ');273 remove_action( 'upgrader_process_complete', 'wp_update_themes ');271 remove_action( 'upgrader_process_complete', 'wp_version_check_upc', 10, 2 ); 272 remove_action( 'upgrader_process_complete', 'wp_update_plugins_upc', 10, 2 ); 273 remove_action( 'upgrader_process_complete', 'wp_update_themes_upc', 10, 2 ); 274 274 275 275 /** This action is documented in wp-admin/includes/class-wp-upgrader.php */ 276 276 do_action( 'upgrader_process_complete', $this, array( … … 282 282 283 283 // Re-add upgrade hooks. 284 284 add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 ); 285 add_action( 'upgrader_process_complete', 'wp_version_check ');286 add_action( 'upgrader_process_complete', 'wp_update_plugins ');287 add_action( 'upgrader_process_complete', 'wp_update_themes ');285 add_action( 'upgrader_process_complete', 'wp_version_check_upc', 10, 2 ); 286 add_action( 'upgrader_process_complete', 'wp_update_plugins_upc', 10, 2 ); 287 add_action( 'upgrader_process_complete', 'wp_update_themes_upc', 10, 2 ); 288 288 289 289 $this->skin->bulk_footer(); 290 290 -
src/wp-admin/includes/class-wp-automatic-updater.php
389 389 390 390 // Don't automatically run these thins, as we'll handle it ourselves 391 391 remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 ); 392 remove_action( 'upgrader_process_complete', 'wp_version_check ');393 remove_action( 'upgrader_process_complete', 'wp_update_plugins ');394 remove_action( 'upgrader_process_complete', 'wp_update_themes ');392 remove_action( 'upgrader_process_complete', 'wp_version_check_upc', 10, 2 ); 393 remove_action( 'upgrader_process_complete', 'wp_update_plugins_upc', 10, 2 ); 394 remove_action( 'upgrader_process_complete', 'wp_update_themes_upc', 10, 2 ); 395 395 396 396 // Next, Plugins 397 397 wp_update_plugins(); // Check for Plugin updates -
src/wp-includes/functions.php
2871 2871 * @return string|false The JSON encoded string, or false if it cannot be encoded. 2872 2872 */ 2873 2873 function wp_json_encode( $data, $options = 0, $depth = 512 ) { 2874 // Prepare the data for JSON serialization. 2875 $data = _wp_json_prepare_data( $data ); 2876 2874 2877 /* 2875 2878 * json_encode() has had extra params added over the years. 2876 2879 * $options was added in 5.3, and $depth in 5.5. … … 2884 2887 $args = array( $data ); 2885 2888 } 2886 2889 2887 // Prepare the data for JSON serialization.2888 $args[0] = _wp_json_prepare_data( $data );2889 2890 2890 2891 $json = @call_user_func_array( 'json_encode', $args ); 2891 2892 … … 2897 2898 } 2898 2899 2899 2900 try { 2900 $args[0] = _wp_json_sanity_check( $ data, $depth );2901 $args[0] = _wp_json_sanity_check( $args[0], $depth ); 2901 2902 } catch ( Exception $e ) { 2902 2903 return false; 2903 2904 } -
src/wp-includes/update.php
176 176 } 177 177 178 178 /** 179 * Shim for wp_version_check() to be used with 'upgrader_process_complete' action. 180 */ 181 function wp_version_check_upc( $upgrader, $hook_extra ) { 182 $extra_stats = array(); // Anything interesting to put here, either from $hook_extra or otherwise? 183 wp_version_check( $extra_stats ); 184 } 185 186 /** 179 187 * Check plugin versions against the latest versions hosted on WordPress.org. 180 188 * 181 189 * The WordPress version, PHP version, and Locale is sent along with a list of … … 342 350 } 343 351 344 352 /** 353 * Shim for wp_update_plugins() to be used with 'upgrader_process_complete' action. 354 */ 355 function wp_update_plugins_upc( $upgrader, $hook_extra ) { 356 $extra_stats = array(); // Anything interesting to put here, either from $hook_extra or otherwise? 357 wp_update_plugins( $extra_stats ); 358 } 359 360 /** 345 361 * Check theme versions against the latest versions hosted on WordPress.org. 346 362 * 347 363 * A list of all themes installed in sent to WP. Checks against the … … 499 515 } 500 516 501 517 /** 518 * Shim for wp_update_themes() to be used with 'upgrader_process_complete' action. 519 */ 520 function wp_update_themes_upc( $upgrader, $hook_extra ) { 521 $extra_stats = array(); // Anything interesting to put here, either from $hook_extra or otherwise? 522 wp_update_themes( $extra_stats ); 523 } 524 525 /** 502 526 * Performs WordPress automatic background updates. 503 527 * 504 528 * @since 3.7.0