Update plugin.php
leave verification code for main page only
This commit is contained in:
parent
32d4f2684a
commit
bd4ca8222e
@ -31,13 +31,15 @@ class pluginGoogleTools extends Plugin {
|
||||
|
||||
public function siteHead()
|
||||
{
|
||||
$html = PHP_EOL.'<!-- Google Webmasters Tools -->'.PHP_EOL;
|
||||
$html .= '<meta name="google-site-verification" content="'.$this->getDbField('google-site-verification').'">'.PHP_EOL;
|
||||
global $Url
|
||||
|
||||
if(Text::isEmpty($this->getDbField('google-site-verification'))) {
|
||||
if(Text::isEmpty($this->getDbField('google-site-verification')) || !($Url->whereAmI()=='home')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$html = PHP_EOL.'<!-- Google Webmasters Tools -->'.PHP_EOL;
|
||||
$html .= '<meta name="google-site-verification" content="'.$this->getDbField('google-site-verification').'">'.PHP_EOL;
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
@ -60,4 +62,4 @@ class pluginGoogleTools extends Plugin {
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user