From 5259f34578a0b852afc83a03bb7090b02412e449 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Sun, 5 Jun 2016 12:21:38 +0000 Subject: [PATCH] Upgrader: Don't use `Language_Pack_Upgrader_Skin::before()` and `Language_Pack_Upgrader_Skin::after()` when translations are up to date. Avoids a PHP notice since `Language_Pack_Upgrader_Skin::before()` tries to access a non-existent update. Also, change the `up_to_date` string to use the plural form because translations are only updated in bulk mode. Fixes #36615. git-svn-id: https://develop.svn.wordpress.org/trunk@37635 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-language-pack-upgrader.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wp-admin/includes/class-language-pack-upgrader.php b/src/wp-admin/includes/class-language-pack-upgrader.php index c554a34684..4c212c31d6 100644 --- a/src/wp-admin/includes/class-language-pack-upgrader.php +++ b/src/wp-admin/includes/class-language-pack-upgrader.php @@ -114,7 +114,7 @@ class Language_Pack_Upgrader extends WP_Upgrader { */ public function upgrade_strings() { $this->strings['starting_upgrade'] = __( 'Some of your translations need updating. Sit tight for a few more seconds while we update them as well.' ); - $this->strings['up_to_date'] = __( 'The translation is up to date.' ); // We need to silently skip this case + $this->strings['up_to_date'] = __( 'The translations are up to date.' ); $this->strings['no_package'] = __( 'Update package not available.' ); $this->strings['downloading_package'] = __( 'Downloading translation from %s…' ); $this->strings['unpack_package'] = __( 'Unpacking the update…' ); @@ -181,10 +181,8 @@ class Language_Pack_Upgrader extends WP_Upgrader { if ( empty( $language_updates ) ) { $this->skin->header(); - $this->skin->before(); $this->skin->set_result( true ); $this->skin->feedback( 'up_to_date' ); - $this->skin->after(); $this->skin->bulk_footer(); $this->skin->footer(); return true;