|
@@ 102-106 (lines=5) @@
|
| 99 |
|
|
| 100 |
|
$result = activate_plugin( $plugin, '', $this->network_wide ); |
| 101 |
|
|
| 102 |
|
if ( is_wp_error( $result ) ) { |
| 103 |
|
$this->log[ $plugin ]['error'] = $result->get_error_messages(); |
| 104 |
|
$has_errors = true; |
| 105 |
|
continue; |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
$success = Jetpack::is_plugin_active( $plugin ); |
| 109 |
|
if ( $success && $this->network_wide ) { |
|
@@ 113-117 (lines=5) @@
|
| 110 |
|
$success &= is_plugin_active_for_network( $plugin ); |
| 111 |
|
} |
| 112 |
|
|
| 113 |
|
if ( ! $success ) { |
| 114 |
|
$this->log[ $plugin ]['error'] = $result->get_error_messages; |
| 115 |
|
$has_errors = true; |
| 116 |
|
continue; |
| 117 |
|
} |
| 118 |
|
$this->log[ $plugin ][] = __( 'Plugin activated.', 'jetpack' ); |
| 119 |
|
} |
| 120 |
|
if ( ! $this->bulk && isset( $has_errors ) ) { |