Skip to content

Commit

Permalink
Add new command to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Aug 24, 2023
1 parent 6b311d4 commit 2300064
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,44 @@ wp config has <name> [--type=<type>] [--config-file=<path>]



### wp config is-true

Determines whether value of a specific defined constant or variable is truthy.

~~~
wp config is-true <name> [--type=<type>] [--config-file=<path>]
~~~

This determination is made by evaluating the retrieved value via boolval().

**OPTIONS**

<name>
Name of the wp-config.php constant or variable.

[--type=<type>]
Type of config value to retrieve. Defaults to 'all'.
---
default: all
options:
- constant
- variable
- all
---

[--config-file=<path>]
Specify the file path to the config file to be read. Defaults to the root of the
WordPress installation and the filename "wp-config.php".

**EXAMPLES**

# Assert if MULTISITE is true
$ wp config is-true MULTISITE
$ echo $?
0



### wp config list

Lists variables, constants, and file includes defined in wp-config.php file.
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"config create",
"config get",
"config has",
"config is-true",
"config list",
"config path",
"config set",
Expand Down

0 comments on commit 2300064

Please sign in to comment.