WP_CLI
Runner::show_synopsis_if_composite_command
Show synopsis if the called command is a composite command
Method of the class: Runner{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Runner = new Runner(); $Runner->show_synopsis_if_composite_command();
Runner::show_synopsis_if_composite_command() Runner::show synopsis if composite command code WP-CLI 2.13.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;
}
}
}