function sp_setup_meta_tags() { global $spGlobals, $spVars; $spVars['seodescription'] = ''; $spVars['seokeywords'] = ''; $spVars['seourl'] = ''; echo "\n\n"; if (empty($spGlobals['metadescription'])) { $description = sp_get_metadescription(); if ($description != '') { $description = str_replace('"', '', $description); echo "\t" . '<meta name="description" content="' . $description . '" />' . "\n"; } # add to SEO data $spVars['seodescription'] = $description; } if (empty($spGlobals['metakeywords'])) { $keywords = sp_get_metakeywords(); if ($keywords != '') { $keywords = str_replace('"', '', $keywords); echo "\t" . '<meta name="keywords" content="' . $keywords . '" />' . "\n"; } $spVars['seokeywords'] = $keywords; } if (empty($spGlobals['canonicalurl'])) { # output the canonical url $url = sp_canonical_url(); echo "\t" . '<link rel="canonical" href="' . $url . '" />' . "\n"; $spVars['seourl'] = $url; } }
function sp_setup_meta_tags() { global $spGlobals; if (empty($spGlobals['metadescription'])) { $description = sp_get_metadescription(); if ($description != '') { $description = str_replace('"', '', $description); echo '<meta name="description" content="' . $description . '" />' . "\n"; } } if (empty($spGlobals['metakeywords'])) { $keywords = sp_get_metakeywords(); if ($keywords != '') { $keywords = str_replace('"', '', $keywords); echo '<meta name="keywords" content="' . $keywords . '" />' . "\n"; } } if (empty($spGlobals['canonicalurl'])) { # output the canonical url $url = sp_canonical_url(); echo '<link rel="canonical" href="' . $url . '" />' . "\n"; } }