WP_CLI\Dispatcher
get_path()
Get the path to a command, e.g. "core download"
Хуков нет.
Возвращает
Строку[].
Использование
get_path( $command );
- $command(Subcommand|CompositeCommand) (обязательный)
- .
Код get_path() get path WP-CLI 2.13.0-alpha
function get_path( $command ) {
$path = [];
do {
array_unshift( $path, $command->get_name() );
$command = $command->get_parent();
} while ( $command );
return $path;
}