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