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.8.0-alpha
function get_path( $command ) { $path = []; do { array_unshift( $path, $command->get_name() ); } while ( $command = $command->get_parent() ); return $path; }