| @@ 253-257 (lines=5) @@ | ||
| 250 | protected function deactivate() { |
|
| 251 | $permission_error = false; |
|
| 252 | foreach ( $this->plugins as $plugin ) { |
|
| 253 | if ( ! $this->current_user_can('deactivate_plugin', $plugin ) ) { |
|
| 254 | $error = $this->log[ $plugin ]['error'] = __( 'Sorry, you are not allowed to deactivate this plugin.', 'jetpack' ); |
|
| 255 | $permission_error = true; |
|
| 256 | continue; |
|
| 257 | } |
|
| 258 | ||
| 259 | if ( ! Jetpack::is_plugin_active( $plugin ) ) { |
|
| 260 | $error = $this->log[ $plugin ]['error'] = __( 'The Plugin is already deactivated.', 'jetpack' ); |
|
| @@ 150-154 (lines=5) @@ | ||
| 147 | protected function deactivate() { |
|
| 148 | $permission_error = false; |
|
| 149 | foreach ( $this->plugins as $plugin ) { |
|
| 150 | if ( ! $this->current_user_can('deactivate_plugin', $plugin ) ) { |
|
| 151 | $error = $this->log[ $plugin ]['error'] = __( 'Sorry, you are not allowed to deactivate this plugin.', 'jetpack' ); |
|
| 152 | $permission_error = true; |
|
| 153 | continue; |
|
| 154 | } |
|
| 155 | ||
| 156 | if ( ! Jetpack::is_plugin_active( $plugin ) ) { |
|
| 157 | continue; |
|