From c976db478f4d1da079c77503eb67ff66ba59afeb Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Sat, 2 Aug 2014 14:36:31 +0000 Subject: [PATCH] Upgrader: Use always `window.postMessage` for decrement of update count bubbles when `IFRAME_REQUEST` is defined. Fixes decrement of translation update count bubbles when updated through the bulk upgrader. fixes #29054. git-svn-id: https://develop.svn.wordpress.org/trunk@29357 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-upgrader-skins.php | 40 +++++++------------ 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/src/wp-admin/includes/class-wp-upgrader-skins.php b/src/wp-admin/includes/class-wp-upgrader-skins.php index 1220772752..e6e219c8aa 100644 --- a/src/wp-admin/includes/class-wp-upgrader-skins.php +++ b/src/wp-admin/includes/class-wp-upgrader-skins.php @@ -104,13 +104,22 @@ class WP_Upgrader_Skin { if ( ! $this->result || is_wp_error( $this->result ) || 'up_to_date' === $this->result ) { return; } - echo ''; + '; + } else { + echo ''; + } } } @@ -284,25 +293,6 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin { wp_ob_end_flush_all(); flush(); } - - /** - * Output JavaScript that sends message to parent window to decrement the update counts. - * - * @since 3.9.0 - * - * @param string $type Type of update count to decrement. Likely values include 'plugin', - * 'theme', 'translation', etc. - */ - protected function decrement_update_count( $type ) { - if ( ! $this->result || is_wp_error( $this->result ) || 'up_to_date' === $this->result ) { - return; - } - echo ''; - } } class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin {