</script>';
}
}
+
+ public function bulk_header() {}
+ public function bulk_footer() {}
}
/**
*/
class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
public $in_loop = false;
+ /**
+ * @var string|false
+ */
public $error = false;
public function __construct($args = array()) {
$this->upgrader->strings['skin_upgrade_start'] = __('The update process is starting. This process may take a while on some hosts, so please be patient.');
$this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: <strong>%2$s</strong>');
$this->upgrader->strings['skin_update_failed'] = __('The update of %1$s failed.');
- $this->upgrader->strings['skin_update_successful'] = __('%1$s updated successfully.').' <a onclick="%2$s" href="#" class="hide-if-no-js"><span>'.__('Show Details').'</span><span class="hidden">'.__('Hide Details').'</span>.</a>';
+ $this->upgrader->strings['skin_update_successful'] = __( '%1$s updated successfully.' ) . ' <a onclick="%2$s" href="#" class="hide-if-no-js"><span>' . __( 'Show Details' ) . '</span><span class="hidden">' . __( 'Hide Details' ) . '</span></a>';
$this->upgrader->strings['skin_upgrade_end'] = __('All updates have been completed.');
}
class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin {
public $plugin_info = array(); // Plugin_Upgrader::bulk() will fill this in.
- public function __construct($args = array()) {
- parent::__construct($args);
- }
-
public function add_strings() {
parent::add_strings();
$this->upgrader->strings['skin_before_update_header'] = __('Updating Plugin %1$s (%2$d/%3$d)');
class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin {
public $theme_info = array(); // Theme_Upgrader::bulk() will fill this in.
- public function __construct($args = array()) {
- parent::__construct($args);
- }
-
public function add_strings() {
parent::add_strings();
$this->upgrader->strings['skin_before_update_header'] = __('Updating Theme %1$s (%2$d/%3$d)');
unset( $install_actions['activate_plugin'] );
}
- if ( 'import' == $from )
+ if ( 'import' == $from ) {
$install_actions['importers_page'] = '<a href="' . admin_url('import.php') . '" title="' . esc_attr__('Return to Importers') . '" target="_parent">' . __('Return to Importers') . '</a>';
- else if ( $this->type == 'web' )
+ } elseif ( $this->type == 'web' ) {
$install_actions['plugins_page'] = '<a href="' . self_admin_url('plugin-install.php') . '" title="' . esc_attr__('Return to Plugin Installer') . '" target="_parent">' . __('Return to Plugin Installer') . '</a>';
- else
+ } else {
$install_actions['plugins_page'] = '<a href="' . self_admin_url('plugins.php') . '" title="' . esc_attr__('Return to Plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>';
+ }
if ( ! $this->result || is_wp_error($this->result) ) {
unset( $install_actions['activate_plugin'], $install_actions['network_activate'] );
* @param string|array|WP_Error $data
*/
public function feedback( $data ) {
- if ( is_wp_error( $data ) )
+ if ( is_wp_error( $data ) ) {
$string = $data->get_error_message();
- else if ( is_array( $data ) )
+ } elseif ( is_array( $data ) ) {
return;
- else
+ } else {
$string = $data;
-
+ }
if ( ! empty( $this->upgrader->strings[ $string ] ) )
$string = $this->upgrader->strings[ $string ];