Skip to content

Commit b761a58

Browse files
author
ocean90
committed
Upgrade: Allow update checks on upgrader_process_complete to be run during Ajax requests.
Fixes missing translation updates during shiny updates. Fixes #36914. git-svn-id: https://develop.svn.wordpress.org/trunk@37570 602fd350-edb4-49c9-b593-d223f7449a82
1 parent b705faa commit b761a58

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/wp-admin/includes/admin-filters.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,6 @@
109109

110110
// Upgrade hooks.
111111
add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
112+
add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
113+
add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
114+
add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );

src/wp-includes/update.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,21 +684,18 @@ function wp_clean_update_cache() {
684684

685685
add_action( 'admin_init', '_maybe_update_core' );
686686
add_action( 'wp_version_check', 'wp_version_check' );
687-
add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
688687

689688
add_action( 'load-plugins.php', 'wp_update_plugins' );
690689
add_action( 'load-update.php', 'wp_update_plugins' );
691690
add_action( 'load-update-core.php', 'wp_update_plugins' );
692691
add_action( 'admin_init', '_maybe_update_plugins' );
693692
add_action( 'wp_update_plugins', 'wp_update_plugins' );
694-
add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
695693

696694
add_action( 'load-themes.php', 'wp_update_themes' );
697695
add_action( 'load-update.php', 'wp_update_themes' );
698696
add_action( 'load-update-core.php', 'wp_update_themes' );
699697
add_action( 'admin_init', '_maybe_update_themes' );
700698
add_action( 'wp_update_themes', 'wp_update_themes' );
701-
add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
702699

703700
add_action( 'update_option_WPLANG', 'wp_clean_update_cache' , 10, 0 );
704701

0 commit comments

Comments
 (0)