function build_header($full) { include GSADMININCPATH . 'configuration.php'; $str = ''; // meta description $description = get_page_meta_desc(false); if (!empty($description)) { $str .= '<meta name="description" content="' . $description . '" />' . "\n"; } // meta robots $metarobots = get_page_meta_robots(false); if (!empty($metarobots)) { $str .= '<meta name="robots" content="' . $metarobots . '" />' . "\n"; } // meta keywords $keywords = get_page_meta_keywords(false); if (!empty($keywords)) { $str .= '<meta name="keywords" content="' . $keywords . '" />' . "\n"; } // canonical link if ($full) { $canonical = exec_filter('linkcanonical', get_page_url(true)); // @filter linkcanonical (str) rel canonical link if (!empty($canonical)) { $str .= '<link rel="canonical" href="' . $canonical . '" />' . "\n"; } } // script queue $str .= getScripts(GSFRONT); $str = exec_filter('theme-header', $str); return $str; }
/** * Get Page Header HTML * * This will return header html for a particular page. This will include the * meta desriptions & keywords, canonical and title tags * * @since 1.0 * @uses exec_action * @uses get_page_url * @uses strip_quotes * @uses get_page_meta_desc * @uses get_page_meta_keywords * @uses $metad * @uses $title * @uses $content * @uses $site_full_name from configuration.php * @uses GSADMININCPATH * * @return string HTML for template header */ function get_header($full = true) { include GSADMININCPATH . 'configuration.php'; // meta description $description = get_page_meta_desc(false); if (!empty($description)) { echo '<meta name="description" content="' . $description . '" />' . "\n"; } // meta robots $metarobots = get_page_meta_robots(false); if (!empty($metarobots)) { echo '<meta name="robots" content="' . $metarobots . '" />' . "\n"; } // meta keywords $keywords = get_page_meta_keywords(false); if (!empty($keywords)) { echo '<meta name="keywords" content="' . $keywords . '" />' . "\n"; } // canonical link $canonical = exec_filter('linkcanonical', get_page_url(true)); if ($full and !empty($canonical)) { echo '<link rel="canonical" href="' . $canonical . '" />' . "\n"; } // script queue get_scripts_frontend(); exec_action('theme-header'); }