| @@ 228-234 (lines=7) @@ | ||
| 225 | $this->log[ $plugin ][] = __( 'Plugin activated.', 'jetpack' ); |
|
| 226 | } |
|
| 227 | ||
| 228 | if ( ! $this->bulk && isset( $has_errors ) ) { |
|
| 229 | $plugin = $this->plugins[0]; |
|
| 230 | if ( $permission_error ) { |
|
| 231 | return new WP_Error( 'unauthorized_error', $this->log[ $plugin ]['error'], 403 ); |
|
| 232 | } |
|
| 233 | return new WP_Error( 'activation_error', $this->log[ $plugin ]['error'] ); |
|
| 234 | } |
|
| 235 | } |
|
| 236 | ||
| 237 | protected function current_user_can( $capability, $plugin = null ) { |
|
| @@ 137-143 (lines=7) @@ | ||
| 134 | $this->log[ $plugin ][] = __( 'Plugin activated.', 'jetpack' ); |
|
| 135 | } |
|
| 136 | ||
| 137 | if ( ! $this->bulk && $has_errors ) { |
|
| 138 | $plugin = $this->plugins[0]; |
|
| 139 | if ( $permission_error ) { |
|
| 140 | return new WP_Error( 'unauthorized_error', $this->log[ $plugin ]['error'], 403 ); |
|
| 141 | } |
|
| 142 | return new WP_Error( 'activation_error', $this->log[$plugin]['error'] ); |
|
| 143 | } |
|
| 144 | } |
|
| 145 | ||
| 146 | ||