Add runtime_args to options array for runcommand by mrsdizzie · Pull Request #5722 · wp-cli/wp-cli

danielbachhuber

schlessera

Allow a caller to pass runtime arguments to WP_CLI::runcommand so that it is possible to store all 'default' options in one place.

ex if you want to avoid plugins and themes per default in a script that calls runcommand a lot:

```
$default_cli_opts  = array(
	'return'       => 'all',
	'exit_error'   => false,
	'runtime_args' => array( '--skip-themes', '--skip-plugins' ),
);

$output = WP_CLI::runcommand( 'option get siteurl', $default_cli_opts);
```

@mrsdizzie

Co-authored-by: Alain Schlesser <alain.schlesser@gmail.com>

@mrsdizzie

schlessera

@schlessera

schlessera