diff --git a/src/component.php b/src/component.php index efb20be..48b29ef 100644 --- a/src/component.php +++ b/src/component.php @@ -37,6 +37,11 @@ $params_googletagmanager = $this->params->get('googletagmanager', false); $params_googletagmanagerid = $this->params->get('googletagmanagerid', null); $params_googleanalytics = $this->params->get('googleanalytics', false); $params_googleanalyticsid = $this->params->get('googleanalyticsid', null); +$params_googlesitekey = $this->params->get('googlesitekey', null); + +if (!empty($params_googlesitekey)) { + $this->setMetaData('google-site-verification', htmlspecialchars($params_googlesitekey, ENT_QUOTES, 'UTF-8')); +} // Detecting Active Variables $option = $input->getCmd('option', ''); diff --git a/src/index.php b/src/index.php index e50086d..7a2c6d0 100644 --- a/src/index.php +++ b/src/index.php @@ -53,6 +53,7 @@ $params_googletagmanager = $this->params->get('googletagmanager', false); $params_googletagmanagerid = $this->params->get('googletagmanagerid', null); $params_googleanalytics = $this->params->get('googleanalytics', false); $params_googleanalyticsid = $this->params->get('googleanalyticsid', null); +$params_googlesitekey = $this->params->get('googlesitekey', null); $params_custom_head_start = $this->params->get('custom_head_start', null); $params_custom_head_end = $this->params->get('custom_head_end', null); $params_developmentmode = $this->params->get('developmentmode', false); @@ -188,6 +189,9 @@ $stickyHeader = $this->params->get('stickyHeader') ? 'position-sticky sticky-top // Meta $this->setMetaData('viewport', 'width=device-width, initial-scale=1'); +if (!empty($params_googlesitekey)) { + $this->setMetaData('google-site-verification', htmlspecialchars($params_googlesitekey, ENT_QUOTES, 'UTF-8')); +} if ($this->params->get('fA6KitCode')) { $faKit = "https://kit.fontawesome.com/" . $this->params->get('fA6KitCode') . ".js"; diff --git a/src/language/en-GB/tpl_mokocassiopeia.ini b/src/language/en-GB/tpl_mokocassiopeia.ini index 627b97f..77d093f 100644 --- a/src/language/en-GB/tpl_mokocassiopeia.ini +++ b/src/language/en-GB/tpl_mokocassiopeia.ini @@ -47,6 +47,8 @@ TPL_MOKOCASSIOPEIA_GOOGLEANALYTICS_LABEL="Use Google Analytics?" TPL_MOKOCASSIOPEIA_GOOGLEANALYTICS_DESC="Do you want to use Google Analytics?
More information on Google Analytics can be found here." TPL_MOKOCASSIOPEIA_GOOGLEANALYTICSID_LABEL="Google Analytics ID" TPL_MOKOCASSIOPEIA_GOOGLEANALYTICSID_DESC="Begins with 'G-'" +TPL_MOKOCASSIOPEIA_GOOGLESITEKEY_LABEL="Google Search Console Verification" +TPL_MOKOCASSIOPEIA_GOOGLESITEKEY_DESC="Paste the content value from the <meta name="google-site-verification"> tag. Find this in Google Search Console under Ownership Verification → HTML tag method." ; ===== Branding & icons (Theme tab) ===== TPL_MOKOCASSIOPEIA_BRAND_LABEL="Brand" diff --git a/src/language/en-US/tpl_mokocassiopeia.ini b/src/language/en-US/tpl_mokocassiopeia.ini index 8e78179..d9988c4 100644 --- a/src/language/en-US/tpl_mokocassiopeia.ini +++ b/src/language/en-US/tpl_mokocassiopeia.ini @@ -47,6 +47,8 @@ TPL_MOKOCASSIOPEIA_GOOGLEANALYTICS_LABEL="Use Google Analytics?" TPL_MOKOCASSIOPEIA_GOOGLEANALYTICS_DESC="Do you want to use Google Analytics?
More information on Google Analytics can be found here." TPL_MOKOCASSIOPEIA_GOOGLEANALYTICSID_LABEL="Google Analytics ID" TPL_MOKOCASSIOPEIA_GOOGLEANALYTICSID_DESC="Begins with 'G-'" +TPL_MOKOCASSIOPEIA_GOOGLESITEKEY_LABEL="Google Search Console Verification" +TPL_MOKOCASSIOPEIA_GOOGLESITEKEY_DESC="Paste the content value from the <meta name="google-site-verification"> tag. Find this in Google Search Console under Ownership Verification → HTML tag method." ; ===== Branding & icons (Theme tab) ===== TPL_MOKOCASSIOPEIA_BRAND_LABEL="Brand" diff --git a/src/offline.php b/src/offline.php index 0a2f458..1f206ba 100644 --- a/src/offline.php +++ b/src/offline.php @@ -134,6 +134,11 @@ $params_googletagmanager = $params->get('googletagmanager', false); $params_googletagmanagerid = $params->get('googletagmanagerid', null); $params_googleanalytics = $params->get('googleanalytics', false); $params_googleanalyticsid = $params->get('googleanalyticsid', null); +$params_googlesitekey = $params->get('googlesitekey', null); + +if (!empty($params_googlesitekey)) { + $doc->setMetaData('google-site-verification', htmlspecialchars($params_googlesitekey, ENT_QUOTES, 'UTF-8')); +} /* ----------------------- Login routes & Users diff --git a/src/templateDetails.xml b/src/templateDetails.xml index 551ba51..84da6c6 100644 --- a/src/templateDetails.xml +++ b/src/templateDetails.xml @@ -124,6 +124,7 @@ +