Skip to content

Commit 4d5a382

Browse files
authored
Merge pull request #482 from wp-cli/fix/missing-commands
2 parents 4d385a2 + 042fc1c commit 4d5a382

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,33 @@ wp plugin install <plugin|zip|url>... [--version=<version>] [--force] [--ignore-
327327

328328

329329

330+
### wp plugin is-active
331+
332+
Checks if a given plugin is active.
333+
334+
~~~
335+
wp plugin is-active <plugin> [--network]
336+
~~~
337+
338+
Returns exit code 0 when active, 1 when not active.
339+
340+
**OPTIONS**
341+
342+
<plugin>
343+
The plugin to check.
344+
345+
[--network]
346+
If set, check if plugin is network-activated.
347+
348+
**EXAMPLES**
349+
350+
# Check whether plugin is Active; exit status 0 if active, otherwise 1
351+
$ wp plugin is-active hello
352+
$ echo $?
353+
1
354+
355+
356+
330357
### wp plugin is-installed
331358

332359
Checks if a given plugin is installed.
@@ -1046,6 +1073,30 @@ wp theme install <theme|zip|url>... [--version=<version>] [--force] [--ignore-re
10461073

10471074

10481075

1076+
### wp theme is-active
1077+
1078+
Checks if a given theme is active.
1079+
1080+
~~~
1081+
wp theme is-active <theme>
1082+
~~~
1083+
1084+
Returns exit code 0 when active, 1 when not active.
1085+
1086+
**OPTIONS**
1087+
1088+
<theme>
1089+
The theme to check.
1090+
1091+
**EXAMPLES**
1092+
1093+
# Check whether theme is Active; exit status 0 if active, otherwise 1
1094+
$ wp theme is-active twentyfifteen
1095+
$ echo $?
1096+
1
1097+
1098+
1099+
10491100
### wp theme is-installed
10501101

10511102
Checks if a given theme is installed.

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"plugin delete",
5050
"plugin get",
5151
"plugin install",
52+
"plugin is-active",
5253
"plugin is-installed",
5354
"plugin list",
5455
"plugin path",
@@ -64,6 +65,7 @@
6465
"theme enable",
6566
"theme get",
6667
"theme install",
68+
"theme is-active",
6769
"theme is-installed",
6870
"theme list",
6971
"theme mod",

src/Theme_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ public function is_installed( $args, $assoc_args ) {
775775
* ## OPTIONS
776776
*
777777
* <theme>
778-
* : The plugin to check.
778+
* : The theme to check.
779779
*
780780
* ## EXAMPLES
781781
*

0 commit comments

Comments
 (0)