From 64bd5aa564349179871589451143c8b34271a5ef Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 22 Oct 2013 04:37:09 +0000 Subject: [PATCH] Move upgrader_process_complete for core to its proper place in Core_Upgrader. This means it will be firing as a JS redirect is taking place if the update is from pre-3.4. Acceptable. props dd32. fixes #25659. Built from https://develop.svn.wordpress.org/trunk@25861 git-svn-id: http://core.svn.wordpress.org/trunk@25773 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-upgrader.php | 2 ++ wp-admin/includes/update-core.php | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 94b9cfa79c..2f233a4a0f 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -1406,6 +1406,8 @@ class Core_Upgrader extends WP_Upgrader { } } + do_action( 'upgrader_process_complete', $this, array( 'action' => 'update', 'type' => 'core' ) ); + return $result; } diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php index 3b39b0255b..6481162a2d 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -891,9 +891,6 @@ function update_core($from, $to) { // Remove maintenance file, we're done. $wp_filesystem->delete($maintenance_file); - // Has to be in here, rather than the Upgrader as the filter below will override and kill the process before themes get updated on major updates - do_action( 'upgrader_process_complete', null, array( 'action' => 'update', 'type' => 'core' ) ); - // If we made it this far: do_action( '_core_updated_successfully', $wp_version );