Skip to content

Commit 729a94c

Browse files
authored
Merge branch 'main' into copilot/fix-active-plugins-check
2 parents 4f2f884 + 4d5a382 commit 729a94c

File tree

5 files changed

+68
-5
lines changed

5 files changed

+68
-5
lines changed

.github/workflows/check-branch-alias.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ on:
55
types: [released]
66
workflow_dispatch:
77

8-
permissions: {}
8+
permissions:
9+
contents: write
10+
pull-requests: write
911

1012
jobs:
1113
check-branch-alias:

.github/workflows/issue-triage.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
---
2-
name: Issue Triage
2+
name: Issue and PR Triage
33

44
'on':
55
issues:
66
types: [opened]
7+
pull_request:
8+
types: [opened]
79
workflow_dispatch:
810
inputs:
911
issue_number:
10-
description: 'Issue number to triage (leave empty to process all)'
12+
description: 'Issue/PR number to triage (leave empty to process all)'
1113
required: false
1214
type: string
1315

1416
jobs:
1517
issue-triage:
1618
uses: wp-cli/.github/.github/workflows/reusable-issue-triage.yml@main
1719
with:
18-
issue_number: ${{ github.event_name == 'workflow_dispatch' && inputs.issue_number || github.event.issue.number }}
20+
issue_number: >-
21+
${{
22+
(github.event_name == 'workflow_dispatch' && inputs.issue_number) ||
23+
(github.event_name == 'pull_request' && github.event.pull_request.number) ||
24+
(github.event_name == 'issues' && github.event.issue.number) ||
25+
''
26+
}}

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)