| @@ 204-208 (lines=5) @@ | ||
| 201 | continue; |
|
| 202 | } |
|
| 203 | ||
| 204 | if ( ( ! $this->network_wide && Jetpack::is_plugin_active( $plugin ) ) || is_plugin_active_for_network( $plugin ) ) { |
|
| 205 | $this->log[$plugin]['error'] = __( 'The Plugin is already active.', 'jetpack' ); |
|
| 206 | $has_errors = true; |
|
| 207 | continue; |
|
| 208 | } |
|
| 209 | ||
| 210 | if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) { |
|
| 211 | $this->log[$plugin]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' ); |
|
| @@ 210-214 (lines=5) @@ | ||
| 207 | continue; |
|
| 208 | } |
|
| 209 | ||
| 210 | if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) { |
|
| 211 | $this->log[$plugin]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' ); |
|
| 212 | $has_errors = true; |
|
| 213 | continue; |
|
| 214 | } |
|
| 215 | ||
| 216 | $result = activate_plugin( $plugin, '', $this->network_wide ); |
|
| 217 | ||
| @@ 119-123 (lines=5) @@ | ||
| 116 | continue; |
|
| 117 | } |
|
| 118 | ||
| 119 | if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) { |
|
| 120 | $this->log[$plugin]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' ); |
|
| 121 | $has_errors = true; |
|
| 122 | continue; |
|
| 123 | } |
|
| 124 | ||
| 125 | $result = activate_plugin( $plugin, '', $this->network_wide ); |
|
| 126 | ||