@@ 64-68 (lines=5) @@ | ||
61 | ||
62 | protected function activate() { |
|
63 | foreach ( $this->plugins as $plugin ) { |
|
64 | if ( ( ! $this->network_wide && Jetpack::is_plugin_active( $plugin ) ) || is_plugin_active_for_network( $plugin ) ) { |
|
65 | $this->log[ $plugin ]['error'] = __( 'The Plugin is already active.', 'jetpack' ); |
|
66 | $has_errors = true; |
|
67 | continue; |
|
68 | } |
|
69 | ||
70 | if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) { |
|
71 | $this->log[ $plugin ]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' ); |
|
@@ 70-74 (lines=5) @@ | ||
67 | continue; |
|
68 | } |
|
69 | ||
70 | if ( ! $this->network_wide && is_network_only_plugin( $plugin ) && is_multisite() ) { |
|
71 | $this->log[ $plugin ]['error'] = __( 'Plugin can only be Network Activated', 'jetpack' ); |
|
72 | $has_errors = true; |
|
73 | continue; |
|
74 | } |
|
75 | ||
76 | $result = activate_plugin( $plugin, '', $this->network_wide ); |
|
77 |