WP_CLI::run_command() Edit

Run a given command within the current process using the same global parameters.


Usage Usage

WP_CLI::run_command( $args, $assoc_args = array() )
$args (array) Positional arguments including command name.
$assoc_args (array)

Top ↑

Notes Notes

Use WP_CLI::runcommand() instead, which is easier to use and works better.

To run a command using a new process with the same global parameters,
use WP_CLI::launch_self(). To run a command using a new process with
different global parameters, use WP_CLI::launch().

ob_start();
WP_CLI::run_command( array( 'cli', 'cmd-dump' ) );
$ret = ob_get_clean();

Internal APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. documentation is generated from the WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ codebase on every releaseRelease A release is the distribution of the final version of an application. A software release may be either public or private and generally constitutes the initial or new generation of a new or upgraded application. A release is preceded by the distribution of alpha and then beta versions of the software.. To suggest improvements, please submit a pull request.


Top ↑

Last updated: