File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
255293Lists variables, constants, and file includes defined in wp-config.php file.
Original file line number Diff line number Diff line change 4444 " config create" ,
4545 " config get" ,
4646 " config has" ,
47+ " config is-true" ,
4748 " config list" ,
4849 " config path" ,
4950 " config set" ,
Original file line number Diff line number Diff line change @@ -426,7 +426,8 @@ public function get( $args, $assoc_args ) {
426426 }
427427
428428 /**
429- * Determines whether value of a specific constant or variable defined is truthy.
429+ * Determines whether value of a specific defined constant or variable is truthy.
430+ *
430431 * This determination is made by evaluating the retrieved value via boolval().
431432 *
432433 * ## OPTIONS
@@ -452,7 +453,7 @@ public function get( $args, $assoc_args ) {
452453 *
453454 * # Assert if MULTISITE is true
454455 * $ wp config is-true MULTISITE
455- * echo $?
456+ * $ echo $?
456457 * 0
457458 *
458459 * @subcommand is-true
You can’t perform that action at this time.
0 commit comments