VersionPress\Git\CommitMessage::getVersionPressTag PHP Method

getVersionPressTag() public method

Returns VP tag with given name, or an empty string if no tag of given name is found.
public getVersionPressTag ( $tagName ) : string
$tagName
return string
    public function getVersionPressTag($tagName)
    {
        $tags = $this->getVersionPressTags();
        return isset($tags[$tagName]) ? $tags[$tagName] : "";
    }

Usage Example

Ejemplo n.º 1
0
 public static function buildFromCommitMessage(CommitMessage $commitMessage)
 {
     $actionTag = $commitMessage->getVersionPressTag(TrackedChangeInfo::ACTION_TAG);
     $pluginName = $commitMessage->getVersionPressTag(self::PLUGIN_NAME_TAG);
     list(, $action, $pluginFile) = explode("/", $actionTag, 3);
     return new self($pluginFile, $action, $pluginName);
 }
All Usage Examples Of VersionPress\Git\CommitMessage::getVersionPressTag