diff --git a/README.md b/README.md index 716e60ac..466fe001 100644 --- a/README.md +++ b/README.md @@ -327,6 +327,33 @@ wp plugin install ... [--version=] [--force] [--ignore- +### wp plugin is-active + +Checks if a given plugin is active. + +~~~ +wp plugin is-active [--network] +~~~ + +Returns exit code 0 when active, 1 when not active. + +**OPTIONS** + + + The plugin to check. + + [--network] + If set, check if plugin is network-activated. + +**EXAMPLES** + + # Check whether plugin is Active; exit status 0 if active, otherwise 1 + $ wp plugin is-active hello + $ echo $? + 1 + + + ### wp plugin is-installed Checks if a given plugin is installed. @@ -1046,6 +1073,30 @@ wp theme install ... [--version=] [--force] [--ignore-re +### wp theme is-active + +Checks if a given theme is active. + +~~~ +wp theme is-active +~~~ + +Returns exit code 0 when active, 1 when not active. + +**OPTIONS** + + + The theme to check. + +**EXAMPLES** + + # Check whether theme is Active; exit status 0 if active, otherwise 1 + $ wp theme is-active twentyfifteen + $ echo $? + 1 + + + ### wp theme is-installed Checks if a given theme is installed. diff --git a/composer.json b/composer.json index 4827a65c..422675bc 100644 --- a/composer.json +++ b/composer.json @@ -49,6 +49,7 @@ "plugin delete", "plugin get", "plugin install", + "plugin is-active", "plugin is-installed", "plugin list", "plugin path", @@ -64,6 +65,7 @@ "theme enable", "theme get", "theme install", + "theme is-active", "theme is-installed", "theme list", "theme mod", diff --git a/src/Theme_Command.php b/src/Theme_Command.php index 5ae8459f..efd7cfea 100644 --- a/src/Theme_Command.php +++ b/src/Theme_Command.php @@ -775,7 +775,7 @@ public function is_installed( $args, $assoc_args ) { * ## OPTIONS * * - * : The plugin to check. + * : The theme to check. * * ## EXAMPLES *