WP_CLI
DocParser::get_tag()
Get the value for a given tag (e.g. "@alias" or "@subcommand")
Method of the class: DocParser{}
No Hooks.
Return
String
.
Usage
$DocParser = new DocParser(); $DocParser->get_tag( $name );
- $name(string) (required)
- Name for the tag, without '@'
DocParser::get_tag() DocParser::get tag code WP-CLI 2.8.0-alpha
public function get_tag( $name ) { if ( preg_match( '|^@' . $name . '\s+([a-z-_0-9]+)|m', $this->doc_comment, $matches ) ) { return $matches[1]; } return ''; }