From 752379652d702c981baae4701df55ac1d9c692f3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 4 Aug 2020 17:52:36 +0000 Subject: [PATCH] Plugins: Move the "Successfully installed the plugin" string to the correct `Plugin_Upgrader` method. The string refers to the installation, and belongs in the `::install_strings()` method, not in `::upgrade_strings()`. Props sswebster, nateinaction, SergeyBiryukov. Fixes #50837. git-svn-id: https://develop.svn.wordpress.org/trunk@48734 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-plugin-upgrader.php | 5 ++--- src/wp-admin/includes/class-theme-upgrader.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/includes/class-plugin-upgrader.php b/src/wp-admin/includes/class-plugin-upgrader.php index a11fd1a1d9..27dc757f19 100644 --- a/src/wp-admin/includes/class-plugin-upgrader.php +++ b/src/wp-admin/includes/class-plugin-upgrader.php @@ -64,9 +64,6 @@ class Plugin_Upgrader extends WP_Upgrader { $this->strings['process_failed'] = __( 'Plugin update failed.' ); $this->strings['process_success'] = __( 'Plugin updated successfully.' ); $this->strings['process_bulk_success'] = __( 'Plugins updated successfully.' ); - - /* translators: 1: Plugin name, 2: Plugin version. */ - $this->strings['process_success_specific'] = __( 'Successfully installed the plugin %1$s %2$s.' ); } /** @@ -85,6 +82,8 @@ class Plugin_Upgrader extends WP_Upgrader { $this->strings['no_files'] = __( 'The plugin contains no files.' ); $this->strings['process_failed'] = __( 'Plugin installation failed.' ); $this->strings['process_success'] = __( 'Plugin installed successfully.' ); + /* translators: 1: Plugin name, 2: Plugin version. */ + $this->strings['process_success_specific'] = __( 'Successfully installed the plugin %1$s %2$s.' ); if ( ! empty( $this->skin->overwrite ) ) { if ( 'update-plugin' === $this->skin->overwrite ) { diff --git a/src/wp-admin/includes/class-theme-upgrader.php b/src/wp-admin/includes/class-theme-upgrader.php index f087eb6281..c08d3c2d5c 100644 --- a/src/wp-admin/includes/class-theme-upgrader.php +++ b/src/wp-admin/includes/class-theme-upgrader.php @@ -163,7 +163,7 @@ class Theme_Upgrader extends WP_Upgrader { // Override them. $this->skin->api = $api; - $this->strings['process_success_specific'] = $this->strings['parent_theme_install_success']; //, $api->name, $api->version ); + $this->strings['process_success_specific'] = $this->strings['parent_theme_install_success']; $this->skin->feedback( 'parent_theme_prepare_install', $api->name, $api->version );