CLI_Command::cmd_dump()publicWP-CLI 1.0

Dumps the list of installed commands, as JSON.


# Dump the list of installed commands.
$ wp cli cmd-dump
{"name":"wp","description":"Manage WordPress through the command-line.","longdesc":"\n\n## GLOBAL PARAMETERS\n\n  --path=<path>\n      Path to the WordPress files.\n\n  --ssh=<ssh>\n      Perform operation against a remote server over SSH (or a container using scheme of "docker" or "docker-compose").\n\n  --url=<url>\n      Pretend request came from given URL. In multisite, this argument is how the target site is specified. \n\n  --user=<id|login|email>\n

Метод класса: CLI_Command{}

Хуков нет.


null. Ничего.


$CLI_Command = new CLI_Command();

Код CLI_Command::cmd_dump() WP-CLI 2.8.0-alpha

public function cmd_dump() {
	echo json_encode( $this->command_to_array( WP_CLI::get_root_command() ) );