- Timestamp:
- 09/01/2019 05:12:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-plugin-installer-skin.php
r43598 r45926 43 43 public function before() { 44 44 if ( ! empty( $this->api ) ) { 45 /* translators: 1: name of API, 2: version of API */ 46 $this->upgrader->strings['process_success'] = sprintf( __( 'Successfully installed the plugin <strong>%1$s %2$s</strong>.' ), $this->api->name, $this->api->version ); 45 $this->upgrader->strings['process_success'] = sprintf( 46 /* translators: 1: plugin name, 2: plugin version */ 47 __( 'Successfully installed the plugin <strong>%1$s %2$s</strong>.' ), 48 $this->api->name, 49 $this->api->version 50 ); 47 51 } 48 52 } … … 58 62 59 63 if ( 'import' == $from ) { 60 $install_actions['activate_plugin'] = '<a class="button button-primary" href="' . wp_nonce_url( 'plugins.php?action=activate&from=import&plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Activate Plugin & Run Importer' ) . '</a>'; 64 $install_actions['activate_plugin'] = sprintf( 65 '<a class="button button-primary" href="%s" target="_parent">%s</a>', 66 wp_nonce_url( 'plugins.php?action=activate&from=import&plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ), 67 __( 'Activate Plugin & Run Importer' ) 68 ); 61 69 } elseif ( 'press-this' == $from ) { 62 $install_actions['activate_plugin'] = '<a class="button button-primary" href="' . wp_nonce_url( 'plugins.php?action=activate&from=press-this&plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Activate Plugin & Return to Press This' ) . '</a>'; 70 $install_actions['activate_plugin'] = sprintf( 71 '<a class="button button-primary" href="%s" target="_parent">%s</a>', 72 wp_nonce_url( 'plugins.php?action=activate&from=press-this&plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ), 73 __( 'Activate Plugin & Return to Press This' ) 74 ); 63 75 } else { 64 $install_actions['activate_plugin'] = '<a class="button button-primary" href="' . wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Activate Plugin' ) . '</a>'; 76 $install_actions['activate_plugin'] = sprintf( 77 '<a class="button button-primary" href="%s" target="_parent">%s</a>', 78 wp_nonce_url( 'plugins.php?action=activate&plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ), 79 __( 'Activate Plugin' ) 80 ); 65 81 } 66 82 67 83 if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) { 68 $install_actions['network_activate'] = '<a class="button button-primary" href="' . wp_nonce_url( 'plugins.php?action=activate&networkwide=1&plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ) . '" target="_parent">' . __( 'Network Activate' ) . '</a>'; 84 $install_actions['network_activate'] = sprintf( 85 '<a class="button button-primary" href="%s" target="_parent">%s</a>', 86 wp_nonce_url( 'plugins.php?action=activate&networkwide=1&plugin=' . urlencode( $plugin_file ), 'activate-plugin_' . $plugin_file ), 87 __( 'Network Activate' ) 88 ); 69 89 unset( $install_actions['activate_plugin'] ); 70 90 } 71 91 72 92 if ( 'import' == $from ) { 73 $install_actions['importers_page'] = '<a href="' . admin_url( 'import.php' ) . '" target="_parent">' . __( 'Return to Importers' ) . '</a>'; 93 $install_actions['importers_page'] = sprintf( 94 '<a href="%s" target="_parent">%s</a>', 95 admin_url( 'import.php' ), 96 __( 'Return to Importers' ) 97 ); 74 98 } elseif ( $this->type == 'web' ) { 75 $install_actions['plugins_page'] = '<a href="' . self_admin_url( 'plugin-install.php' ) . '" target="_parent">' . __( 'Return to Plugin Installer' ) . '</a>'; 99 $install_actions['plugins_page'] = sprintf( 100 '<a href="%s" target="_parent">%s</a>', 101 self_admin_url( 'plugin-install.php' ), 102 __( 'Return to Plugin Installer' ) 103 ); 76 104 } elseif ( 'upload' == $this->type && 'plugins' == $from ) { 77 $install_actions['plugins_page'] = '<a href="' . self_admin_url( 'plugin-install.php' ) . '">' . __( 'Return to Plugin Installer' ) . '</a>'; 105 $install_actions['plugins_page'] = sprintf( 106 '<a href="%s">%s</a>', 107 self_admin_url( 'plugin-install.php' ), 108 __( 'Return to Plugin Installer' ) 109 ); 78 110 } else { 79 $install_actions['plugins_page'] = '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>'; 111 $install_actions['plugins_page'] = sprintf( 112 '<a href="%s" target="_parent">%s</a>', 113 self_admin_url( 'plugins.php' ), 114 __( 'Return to Plugins page' ) 115 ); 80 116 } 81 117
Note: See TracChangeset
for help on using the changeset viewer.