From f4a47d44e9969150e65e1d70bafaa86d8380c03a Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 23 Jul 2019 17:13:07 -0700 Subject: [PATCH] Meta-tag viewport fix and more. --- e107_handlers/application.php | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/e107_handlers/application.php b/e107_handlers/application.php index fba49da8a..fa0bef2a5 100644 --- a/e107_handlers/application.php +++ b/e107_handlers/application.php @@ -4296,7 +4296,10 @@ class eResponse //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. - + + + + $attr = array(); if(null !== $name) @@ -4323,9 +4326,19 @@ class eResponse 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; } @@ -4351,6 +4364,8 @@ class eResponse $this->setMeta('keywords', implode(',',$tmp3)); } + + e107::getDebug()->log($this->_meta); foreach ($this->_meta as $attr)