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
This commit is contained in:
Sergey Biryukov 2020-08-04 17:52:36 +00:00
parent 3fb50acb41
commit 752379652d
2 changed files with 3 additions and 4 deletions

View File

@ -64,9 +64,6 @@ class Plugin_Upgrader extends WP_Upgrader {
$this->strings['process_failed'] = __( 'Plugin update failed.' ); $this->strings['process_failed'] = __( 'Plugin update failed.' );
$this->strings['process_success'] = __( 'Plugin updated successfully.' ); $this->strings['process_success'] = __( 'Plugin updated successfully.' );
$this->strings['process_bulk_success'] = __( 'Plugins 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 <strong>%1$s %2$s</strong>.' );
} }
/** /**
@ -85,6 +82,8 @@ class Plugin_Upgrader extends WP_Upgrader {
$this->strings['no_files'] = __( 'The plugin contains no files.' ); $this->strings['no_files'] = __( 'The plugin contains no files.' );
$this->strings['process_failed'] = __( 'Plugin installation failed.' ); $this->strings['process_failed'] = __( 'Plugin installation failed.' );
$this->strings['process_success'] = __( 'Plugin installed successfully.' ); $this->strings['process_success'] = __( 'Plugin installed successfully.' );
/* translators: 1: Plugin name, 2: Plugin version. */
$this->strings['process_success_specific'] = __( 'Successfully installed the plugin <strong>%1$s %2$s</strong>.' );
if ( ! empty( $this->skin->overwrite ) ) { if ( ! empty( $this->skin->overwrite ) ) {
if ( 'update-plugin' === $this->skin->overwrite ) { if ( 'update-plugin' === $this->skin->overwrite ) {

View File

@ -163,7 +163,7 @@ class Theme_Upgrader extends WP_Upgrader {
// Override them. // Override them.
$this->skin->api = $api; $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 ); $this->skin->feedback( 'parent_theme_prepare_install', $api->name, $api->version );