Help_Command::get_initial_markdown()private staticWP-CLI 1.0

Метод класса: Help_Command{}

No Hooks.

Return

null. Nothing.

Usage

$result = Help_Command::get_initial_markdown( $command );
$command (required)
-

Code of Help_Command::get_initial_markdown() WP-CLI 2.7.0-alpha

private static function get_initial_markdown( $command ) {
	$name = implode( ' ', Dispatcher\get_path( $command ) );

	$binding = [
		'name'      => $name,
		'shortdesc' => $command->get_shortdesc(),
	];

	$binding['synopsis'] = "$name " . $command->get_synopsis();

	$alias = $command->get_alias();
	if ( $alias ) {
		$binding['alias'] = $alias;
	}

	if ( $command->can_have_subcommands() ) {
		$binding['has-subcommands']['subcommands'] = self::render_subcommands( $command );
	}

	return Utils\mustache_render( 'man.mustache', $binding );
}