| @@ 210-214 (lines=5) @@ | ||
| 207 | continue; |
|
| 208 | } |
|
| 209 | ||
| 210 | if ( ( ! $this->network_wide && Jetpack::is_plugin_active( $plugin ) ) || is_plugin_active_for_network( $plugin ) ) { |
|
| 211 | $this->log[$plugin]['error'] = __( 'The Plugin is already active.', 'jetpack' ); |
|
| 212 | $has_errors = true; |
|
| 213 | continue; |
|
| 214 | } |
|
| 215 | ||
| 216 | if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) { |
|
| 217 | $this->log[$plugin]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' ); |
|
| @@ 216-220 (lines=5) @@ | ||
| 213 | continue; |
|
| 214 | } |
|
| 215 | ||
| 216 | if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) { |
|
| 217 | $this->log[$plugin]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' ); |
|
| 218 | $has_errors = true; |
|
| 219 | continue; |
|
| 220 | } |
|
| 221 | ||
| 222 | $result = activate_plugin( $plugin, '', $this->network_wide ); |
|
| 223 | ||
| @@ 131-135 (lines=5) @@ | ||
| 128 | continue; |
|
| 129 | } |
|
| 130 | ||
| 131 | if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) { |
|
| 132 | $this->log[ $plugin ]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' ); |
|
| 133 | ||
| 134 | $has_errors = true; |
|
| 135 | continue; |
|
| 136 | } |
|
| 137 | ||
| 138 | $result = activate_plugin( $plugin, '', $this->network_wide ); |
|