Skip to content

Commit 6769a96

Browse files
swissspidyCopilot
andauthored
Update src/Plugin_Command.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c58ba1d commit 6769a96

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Plugin_Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@ public function activate( $args, $assoc_args = [] ) {
384384
foreach ( $plugins as $plugin ) {
385385
$status = $this->get_status( $plugin->file );
386386
// When using --all flag, skip plugins that are already in the target state.
387-
$target_status = $network_wide ? 'active-network' : 'active';
388-
if ( $all && ! $force && $target_status === $status ) {
387+
$skip_statuses = $network_wide ? array( 'active-network' ) : array( 'active', 'active-network' );
388+
if ( $all && ! $force && in_array( $status, $skip_statuses, true ) ) {
389389
continue;
390390
}
391391
// Network-active is the highest level of activation status.

0 commit comments

Comments
 (0)