OSDN Git Service

Clearer confirmation message when network-activating plugins
authorJohn Blackbourn <johnbillion@gmail.com>
Sun, 4 Aug 2013 15:11:14 +0000 (16:11 +0100)
committerJohn Blackbourn <johnbillion@gmail.com>
Sun, 4 Aug 2013 15:11:14 +0000 (16:11 +0100)
php/commands/plugin.php

index e95c568..c6f4428 100644 (file)
@@ -89,7 +89,10 @@ class Plugin_Command extends \WP_CLI\CommandWithUpgrade {
                activate_plugin( $file, '', $network_wide );
 
                if ( $this->check_active( $file, $network_wide ) ) {
-                       WP_CLI::success( "Plugin '$name' activated." );
+                       if ( $network_wide )
+                               WP_CLI::success( "Plugin '$name' network activated." );
+                       else
+                               WP_CLI::success( "Plugin '$name' activated." );
                } else {
                        WP_CLI::error( 'Could not activate plugin: ' . $name );
                }
@@ -109,7 +112,10 @@ class Plugin_Command extends \WP_CLI\CommandWithUpgrade {
                deactivate_plugins( $file, false, $network_wide );
 
                if ( ! $this->check_active( $file, $network_wide ) ) {
-                       WP_CLI::success( "Plugin '$name' deactivated." );
+                       if ( $network_wide )
+                               WP_CLI::success( "Plugin '$name' network deactivated." );
+                       else
+                               WP_CLI::success( "Plugin '$name' deactivated." );
                } else {
                        WP_CLI::error( 'Could not deactivate plugin: ' . $name );
                }