WP_CLI\Dispatcher
RootCommand::find_subcommand()
Find a subcommand registered on the root command.
Method of the class: RootCommand{}
No Hooks.
Return
Subcommand|false
.
Usage
$RootCommand = new RootCommand(); $RootCommand->find_subcommand( $args );
- $args(array) (required) (passed by reference — &)
- -
RootCommand::find_subcommand() RootCommand::find subcommand code WP-CLI 2.8.0-alpha
public function find_subcommand( &$args ) { $command = array_shift( $args ); Utils\load_command( $command ); if ( ! isset( $this->subcommands[ $command ] ) ) { return false; } return $this->subcommands[ $command ]; }