Skip to content

Commit 90c9a75

Browse files
authored
Merge pull request #5953 from i-am-chitti/GH-5259/update-runcommand-docs
Add defaults and accepted values for runcommand() options in doc
2 parents 63115a0 + 57bfc0c commit 90c9a75

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

php/class-wp-cli.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,15 @@ public static function get_config( $key = null ) {
12911291
* @category Execution
12921292
*
12931293
* @param string $command WP-CLI command to run, including arguments.
1294-
* @param array $options Configuration options for command execution.
1294+
* @param array $options {
1295+
* Configuration options for command execution.
1296+
*
1297+
* @type bool $launch Launches a new process (true) or reuses the existing process (false). Default: true.
1298+
* @type bool $exit_error Halts the script on error. Default: true.
1299+
* @type bool|string $return Returns output as an object when set to 'all' (string), return just the 'stdout', 'stderr', or 'return_code' (string) of command, or print directly to stdout/stderr (false). Default: false.
1300+
* @type bool|string $parse Parse returned output as 'json' (string); otherwise, output is unchanged (false). Default: false.
1301+
* @param array $command_args Contains additional command line arguments for the command. Each element represents a single argument. Default: empty array.
1302+
* }
12951303
* @return mixed
12961304
*/
12971305
public static function runcommand( $command, $options = [] ) {

0 commit comments

Comments
 (0)