WP_CLI

Runner::show_synopsis_if_composite_command()publicWP-CLI 1.0

Show synopsis if the called command is a composite command

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

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$Runner = new Runner();
$Runner->show_synopsis_if_composite_command();

Код Runner::show_synopsis_if_composite_command() WP-CLI 2.8.0-alpha

public function show_synopsis_if_composite_command() {
	$r = $this->find_command_to_run( $this->arguments );
	if ( is_array( $r ) ) {
		list( $command ) = $r;

		if ( $command->can_have_subcommands() ) {
			$command->show_usage();
			exit;
		}
	}
}