Skip to content

Commit 90ffe25

Browse files
committed
Merge pull request #513 from TGMPA/feature/use-correct-phrase
Fix page title on single plugin update.
2 parents c8a5262 + 245f144 commit 90ffe25

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

class-tgm-plugin-activation.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ public function init() {
322322
'page_title' => __( 'Install Required Plugins', 'tgmpa' ),
323323
'menu_title' => __( 'Install Plugins', 'tgmpa' ),
324324
'installing' => __( 'Installing Plugin: %s', 'tgmpa' ),
325+
'updating' => __( 'Updating Plugin: %s', 'tgmpa' ),
325326
'oops' => __( 'Something went wrong with the plugin API.', 'tgmpa' ),
326327
'notice_can_install_required' => _n_noop(
327328
'This theme requires the following plugin: %1$s.',
@@ -753,15 +754,17 @@ protected function do_plugin_install() {
753754
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
754755
}
755756

757+
$title = ( 'update' === $install_type ) ? $this->strings['updating'] : $this->strings['installing'];
756758
$skin_args = array(
757759
'type' => ( 'bundled' !== $this->plugins[ $slug ]['source_type'] ) ? 'web' : 'upload',
758-
'title' => sprintf( $this->strings['installing'], $this->plugins[ $slug ]['name'] ),
760+
'title' => sprintf( $title, $this->plugins[ $slug ]['name'] ),
759761
'url' => esc_url_raw( $url ),
760762
'nonce' => $install_type . '-plugin_' . $slug,
761763
'plugin' => '',
762764
'api' => $api,
763765
'extra' => $extra,
764766
);
767+
unset( $title );
765768

766769
if ( 'update' === $install_type ) {
767770
$skin_args['plugin'] = $this->plugins[ $slug ]['file_path'];

example.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ function my_theme_register_required_plugins() {
134134
'page_title' => __( 'Install Required Plugins', 'theme-slug' ),
135135
'menu_title' => __( 'Install Plugins', 'theme-slug' ),
136136
'installing' => __( 'Installing Plugin: %s', 'theme-slug' ), // %s = plugin name.
137+
'updating' => __( 'Updating Plugin: %s', 'theme-slug' ), // %s = plugin name.
137138
'oops' => __( 'Something went wrong with the plugin API.', 'theme-slug' ),
138139
'notice_can_install_required' => _n_noop(
139140
'This theme requires the following plugin: %1$s.',

0 commit comments

Comments
 (0)