WP_CLI\Dispatcher
RootCommand::find_subcommand
Find a subcommand registered on the root command.
Метод класса: RootCommand{}
Хуков нет.
Возвращает
Subcommand|false.
Использование
$RootCommand = new RootCommand(); $RootCommand->find_subcommand( $args );
- $args(массив) (обязательный) (передается по ссылке — &)
- .
Код RootCommand::find_subcommand() RootCommand::find subcommand WP-CLI 2.13.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 ];
}