Skip to content

Commit 2300064

Browse files
Add new command to the README
1 parent 6b311d4 commit 2300064

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,44 @@ wp config has <name> [--type=<type>] [--config-file=<path>]
250250

251251

252252

253+
### wp config is-true
254+
255+
Determines whether value of a specific defined constant or variable is truthy.
256+
257+
~~~
258+
wp config is-true <name> [--type=<type>] [--config-file=<path>]
259+
~~~
260+
261+
This determination is made by evaluating the retrieved value via boolval().
262+
263+
**OPTIONS**
264+
265+
<name>
266+
Name of the wp-config.php constant or variable.
267+
268+
[--type=<type>]
269+
Type of config value to retrieve. Defaults to 'all'.
270+
---
271+
default: all
272+
options:
273+
- constant
274+
- variable
275+
- all
276+
---
277+
278+
[--config-file=<path>]
279+
Specify the file path to the config file to be read. Defaults to the root of the
280+
WordPress installation and the filename "wp-config.php".
281+
282+
**EXAMPLES**
283+
284+
# Assert if MULTISITE is true
285+
$ wp config is-true MULTISITE
286+
$ echo $?
287+
0
288+
289+
290+
253291
### wp config list
254292

255293
Lists variables, constants, and file includes defined in wp-config.php file.

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"config create",
4545
"config get",
4646
"config has",
47+
"config is-true",
4748
"config list",
4849
"config path",
4950
"config set",

0 commit comments

Comments
 (0)