From da72b04ab2554375d3aa42af15dd50db605bab87 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Wed, 25 May 2016 19:36:28 +0000 Subject: [PATCH] Upgrade: Allow update checks on `upgrader_process_complete` to be run during Ajax requests. Fixes missing translation updates during shiny updates. Fixes #36914. Built from https://develop.svn.wordpress.org/trunk@37570 git-svn-id: http://core.svn.wordpress.org/trunk@37538 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/admin-filters.php | 3 +++ wp-includes/update.php | 3 --- wp-includes/version.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/admin-filters.php b/wp-admin/includes/admin-filters.php index bea7a25cc2..d9c6f6051f 100644 --- a/wp-admin/includes/admin-filters.php +++ b/wp-admin/includes/admin-filters.php @@ -109,3 +109,6 @@ add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' ); // Upgrade hooks. add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 ); +add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 ); +add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 ); +add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 ); diff --git a/wp-includes/update.php b/wp-includes/update.php index 3d5dcd01d0..59b618c31a 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -684,21 +684,18 @@ if ( ( ! is_main_site() && ! is_network_admin() ) || ( defined( 'DOING_AJAX' ) & add_action( 'admin_init', '_maybe_update_core' ); add_action( 'wp_version_check', 'wp_version_check' ); -add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 ); add_action( 'load-plugins.php', 'wp_update_plugins' ); add_action( 'load-update.php', 'wp_update_plugins' ); add_action( 'load-update-core.php', 'wp_update_plugins' ); add_action( 'admin_init', '_maybe_update_plugins' ); add_action( 'wp_update_plugins', 'wp_update_plugins' ); -add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 ); add_action( 'load-themes.php', 'wp_update_themes' ); add_action( 'load-update.php', 'wp_update_themes' ); add_action( 'load-update-core.php', 'wp_update_themes' ); add_action( 'admin_init', '_maybe_update_themes' ); add_action( 'wp_update_themes', 'wp_update_themes' ); -add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 ); add_action( 'update_option_WPLANG', 'wp_clean_update_cache' , 10, 0 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index f358285379..6aae1d4692 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37569'; +$wp_version = '4.6-alpha-37570'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.