mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
Meta-tag viewport fix and more.
This commit is contained in:
@@ -4297,6 +4297,9 @@ class eResponse
|
|||||||
//TODO need an option that allows subsequent entries to overwrite existing ones.
|
//TODO need an option that allows subsequent entries to overwrite existing ones.
|
||||||
//ie. 'description' and 'keywords' should never be duplicated, but overwritten by plugins and other non-pref-based meta data.
|
//ie. 'description' and 'keywords' should never be duplicated, but overwritten by plugins and other non-pref-based meta data.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$attr = array();
|
$attr = array();
|
||||||
|
|
||||||
if(null !== $name)
|
if(null !== $name)
|
||||||
@@ -4323,9 +4326,19 @@ class eResponse
|
|||||||
else $attr = $extended;
|
else $attr = $extended;
|
||||||
}
|
}
|
||||||
|
|
||||||
$key = ($name === 'keywords') ? $name : null; // prevent multiple tags.
|
|
||||||
|
|
||||||
if(!empty($attr)) $this->_meta[$key] = $attr;
|
if(!empty($attr))
|
||||||
|
{
|
||||||
|
if($name === 'keywords') // prevent multiple keyword tags.
|
||||||
|
{
|
||||||
|
$this->_meta['keywords'] = $attr;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->_meta[] = $attr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4351,6 +4364,8 @@ class eResponse
|
|||||||
$this->setMeta('keywords', implode(',',$tmp3));
|
$this->setMeta('keywords', implode(',',$tmp3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
e107::getDebug()->log($this->_meta);
|
e107::getDebug()->log($this->_meta);
|
||||||
|
|
||||||
foreach ($this->_meta as $attr)
|
foreach ($this->_meta as $attr)
|
||||||
|
Reference in New Issue
Block a user