From 40ad44ef6347f1f83f06a8e1bfe223a700797cff Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Tue, 21 Nov 2017 20:45:36 +0200 Subject: [PATCH 1/3] Update plugin.php Fixed Google HTML verification and tag displaying --- bl-plugins/google/plugin.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/bl-plugins/google/plugin.php b/bl-plugins/google/plugin.php index 124ac535..c078559a 100644 --- a/bl-plugins/google/plugin.php +++ b/bl-plugins/google/plugin.php @@ -5,8 +5,8 @@ class pluginGoogle extends Plugin { public function init() { $this->dbFields = array( - 'google-analytics-tracking-id'=>'', - 'google-site-verification'=>'', + 'google-site-verification'=>'' + 'google-analytics-tracking-id'=>'',, 'google-tag-manager'=>'' ); } @@ -16,14 +16,14 @@ class pluginGoogle extends Plugin { global $Language; $html = '
'; - $html .= ''; - $html .= ''; + $html .= ''; + $html .= ''; $html .= ''.$Language->get('complete-this-field-with-the-google-site-verification').''; $html .= '
'; $html .= '
'; - $html .= ''; - $html .= ''; + $html .= ''; + $html .= ''; $html .= ''.$Language->get('complete-this-field-with-the-tracking-id').''; $html .= '
'; @@ -39,12 +39,11 @@ class pluginGoogle extends Plugin { public function siteHead() { global $Url; - global $WHERE_AM_I; $html = ''; // Google HTML tag - if ($this->getValue('google-site-verification') && ($WHERE_AM_I=='home')) { + if( $this->getValue('google-site-verification') && $Url->whereAmI()=='home' ) { $html .= PHP_EOL.''.PHP_EOL; $html .= ''.PHP_EOL; } @@ -61,8 +60,8 @@ class pluginGoogle extends Plugin { } // Google Analytics - if ($this->getValue('google-analytics-tracking-id')) { - $html = PHP_EOL.''.PHP_EOL; + if( $this->getValue('google-analytics-tracking-id') ) { + $html .= PHP_EOL.''.PHP_EOL; $html .= '