|
@@ 78-82 (lines=5) @@
|
| 75 |
|
|
| 76 |
|
$result = activate_plugin( $plugin, '', $this->network_wide ); |
| 77 |
|
|
| 78 |
|
if ( is_wp_error( $result ) ) { |
| 79 |
|
$this->log[ $plugin ]['error'] = $result->get_error_messages(); |
| 80 |
|
$has_errors = true; |
| 81 |
|
continue; |
| 82 |
|
} |
| 83 |
|
|
| 84 |
|
$success = Jetpack::is_plugin_active( $plugin ); |
| 85 |
|
if ( $success && $this->network_wide ) { |
|
@@ 89-93 (lines=5) @@
|
| 86 |
|
$success &= is_plugin_active_for_network( $plugin ); |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
if ( ! $success ) { |
| 90 |
|
$this->log[ $plugin ]['error'] = $result->get_error_messages; |
| 91 |
|
$has_errors = true; |
| 92 |
|
continue; |
| 93 |
|
} |
| 94 |
|
$this->log[ $plugin ][] = __( 'Plugin activated.', 'jetpack' ); |
| 95 |
|
} |
| 96 |
|
if ( ! $this->bulk && isset( $has_errors ) ) { |