| @@ 195-199 (lines=5) @@ | ||
| 192 | continue; |
|
| 193 | } |
|
| 194 | ||
| 195 | if ( ( ! $this->network_wide && Jetpack::is_plugin_active( $plugin ) ) || is_plugin_active_for_network( $plugin ) ) { |
|
| 196 | $this->log[ $plugin ]['error'] = __( 'The Plugin is already active.', 'jetpack' ); |
|
| 197 | $has_errors = true; |
|
| 198 | continue; |
|
| 199 | } |
|
| 200 | ||
| 201 | if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) { |
|
| 202 | $this->log[ $plugin ]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' ); |
|
| @@ 201-205 (lines=5) @@ | ||
| 198 | continue; |
|
| 199 | } |
|
| 200 | ||
| 201 | if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) { |
|
| 202 | $this->log[ $plugin ]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' ); |
|
| 203 | $has_errors = true; |
|
| 204 | continue; |
|
| 205 | } |
|
| 206 | ||
| 207 | $result = activate_plugin( $plugin, '', $this->network_wide ); |
|
| 208 | ||
| @@ 110-114 (lines=5) @@ | ||
| 107 | continue; |
|
| 108 | } |
|
| 109 | ||
| 110 | if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) { |
|
| 111 | $this->log[$plugin]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' ); |
|
| 112 | $has_errors = true; |
|
| 113 | continue; |
|
| 114 | } |
|
| 115 | ||
| 116 | $result = activate_plugin( $plugin, '', $this->network_wide ); |
|
| 117 | ||