@@ 88-92 (lines=5) @@ | ||
85 | ||
86 | protected function activate() { |
|
87 | foreach ( $this->plugins as $plugin ) { |
|
88 | if ( ( ! $this->network_wide && Jetpack::is_plugin_active( $plugin ) ) || is_plugin_active_for_network( $plugin ) ) { |
|
89 | $this->log[ $plugin ]['error'] = __( 'The Plugin is already active.', 'jetpack' ); |
|
90 | $has_errors = true; |
|
91 | continue; |
|
92 | } |
|
93 | ||
94 | if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) { |
|
95 | $this->log[ $plugin ]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' ); |
|
@@ 94-98 (lines=5) @@ | ||
91 | continue; |
|
92 | } |
|
93 | ||
94 | if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) { |
|
95 | $this->log[ $plugin ]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' ); |
|
96 | $has_errors = true; |
|
97 | continue; |
|
98 | } |
|
99 | ||
100 | $result = activate_plugin( $plugin, '', $this->network_wide ); |
|
101 |