WP_CLI

DocParser::get_arg_desc()publicWP-CLI 1.0

Get the description for a given argument.

Method of the class: DocParser{}

No Hooks.

Return

String.

Usage

$DocParser = new DocParser();
$DocParser->get_arg_desc( $name );
$name(string) (required)
Argument's doc name.

DocParser::get_arg_desc() code WP-CLI 2.8.0-alpha

public function get_arg_desc( $name ) {

	if ( preg_match( "/\[?<{$name}>.+\n: (.+?)(\n|$)/", $this->doc_comment, $matches ) ) {
		return $matches[1];
	}

	return '';

}