/**
* Gets a meta tag.
*
* @param string $name Name of the meta HTML tag
* @param string $attribute Attribute to use in the meta HTML tag
*
* @return string
*
* @since 1.7.0
*/
public function getMetaData($name, $attribute = 'name')
{
// B/C old http_equiv parameter.
if (!\is_string($attribute)) {
$attribute = $attribute == true ? 'http-equiv' : 'name';
}
if ($name === 'generator') {
$result = $this->getGenerator();
} elseif ($name === 'description') {
$result = $this->getDescription();
} else {
$result = isset($this->_metaTags[$attribute]) && isset($this->_metaTags[$attribute][$name]) ? $this->_metaTags[$attribute][$name] : '';
}
return $result;
}