WP_CLI
DocParser::get_shortdesc
Get the command's short description (e.g. summary).
Method of the class: DocParser{}
No Hooks.
Returns
String.
Usage
$DocParser = new DocParser(); $DocParser->get_shortdesc();
DocParser::get_shortdesc() DocParser::get shortdesc code WP-CLI 2.13.0-alpha
public function get_shortdesc() {
if ( ! preg_match( '|^([^@][^\n]+)\n*|', $this->doc_comment, $matches ) ) {
return '';
}
return $matches[1];
}