WP_CLI
DocParser::get_param_desc
Get the description for a given parameter.
Method of the class: DocParser{}
No Hooks.
Returns
String.
Usage
$DocParser = new DocParser(); $DocParser->get_param_desc( $key );
- $key(string) (required)
- Parameter's key.
DocParser::get_param_desc() DocParser::get param desc code WP-CLI 2.13.0-alpha
public function get_param_desc( $key ) {
if ( preg_match( "/\[?--{$key}=.+\n: (.+?)(\n|$)/", $this->doc_comment, $matches ) ) {
return $matches[1];
}
return '';
}