| @@ 218-222 (lines=5) @@ | ||
| 215 | ||
| 216 | $result = activate_plugin( $plugin, '', $this->network_wide ); |
|
| 217 | ||
| 218 | if ( is_wp_error( $result ) ) { |
|
| 219 | $this->log[$plugin]['error'] = $result->get_error_messages(); |
|
| 220 | $has_errors = true; |
|
| 221 | continue; |
|
| 222 | } |
|
| 223 | ||
| 224 | $success = Jetpack::is_plugin_active( $plugin ); |
|
| 225 | if ( $success && $this->network_wide ) { |
|
| @@ 229-233 (lines=5) @@ | ||
| 226 | $success &= is_plugin_active_for_network( $plugin ); |
|
| 227 | } |
|
| 228 | ||
| 229 | if ( ! $success ) { |
|
| 230 | $this->log[$plugin]['error'] = $result->get_error_messages; |
|
| 231 | $has_errors = true; |
|
| 232 | continue; |
|
| 233 | } |
|
| 234 | $this->log[$plugin][] = __( 'Plugin activated.', 'jetpack' ); |
|
| 235 | } |
|
| 236 | ||
| @@ 127-131 (lines=5) @@ | ||
| 124 | ||
| 125 | $result = activate_plugin( $plugin, '', $this->network_wide ); |
|
| 126 | ||
| 127 | if ( is_wp_error( $result ) ) { |
|
| 128 | $this->log[$plugin]['error'] = $result->get_error_messages(); |
|
| 129 | $has_errors = true; |
|
| 130 | continue; |
|
| 131 | } |
|
| 132 | ||
| 133 | $success = Jetpack::is_plugin_active( $plugin ); |
|
| 134 | if ( $success && $this->network_wide ) { |
|