@@ 27-29 (lines=3) @@ | ||
24 | ||
25 | $plugin = self::get_plugin_id_by_slug( $slug ); |
|
26 | $error_code = 'install_error'; |
|
27 | if ( ! $plugin ) { |
|
28 | $error = $this->log[ $slug ]['error'] = __( 'There was an error installing your plugin', 'jetpack' ); |
|
29 | } |
|
30 | ||
31 | if ( ! $this->bulk && ! $result ) { |
|
32 | $error_code = $upgrader->skin->get_main_error_code(); |
@@ 128-131 (lines=4) @@ | ||
125 | ||
126 | protected function deactivate() { |
|
127 | foreach ( $this->plugins as $plugin ) { |
|
128 | if ( ! Jetpack::is_plugin_active( $plugin ) ) { |
|
129 | $error = $this->log[ $plugin ]['error'] = __( 'The Plugin is already deactivated.', 'jetpack' ); |
|
130 | continue; |
|
131 | } |
|
132 | ||
133 | deactivate_plugins( $plugin, false, $this->network_wide ); |
|
134 | ||
@@ 140-143 (lines=4) @@ | ||
137 | $success &= ! is_plugin_active_for_network( $plugin ); |
|
138 | } |
|
139 | ||
140 | if ( ! $success ) { |
|
141 | $error = $this->log[ $plugin ]['error'] = __( 'There was an error deactivating your plugin', 'jetpack' ); |
|
142 | continue; |
|
143 | } |
|
144 | $this->log[ $plugin ][] = __( 'Plugin deactivated.', 'jetpack' ); |
|
145 | } |
|
146 | if ( ! $this->bulk && isset( $error ) ) { |