/**
 * Get Page Footer for themes
 * executes theme-footer hook
 * Also gets all frontend scripts set to footer
 *
 * @since 2.0
 * @uses exec_action
 *
 * @return string HTML for template header
 */
function get_footer()
{
    get_scripts_frontend(true);
    exec_action('theme-footer');
    // @hook theme-footer after get_footer html output
}
Example #2
0
 public static function outputHeader($full = true, $omit = null)
 {
     global $metad, $metak, $title, $content, $url, $parent, $language;
     include GSADMININCPATH . 'configuration.php';
     if ($metad != '') {
         $description = stripslashes(htmlspecialchars_decode($metad, ENT_QUOTES));
     } else {
         if (function_exists('mb_substr')) {
             $description = trim(mb_substr(html_entity_decode(strip_tags(stripslashes(htmlspecialchars_decode($content, ENT_QUOTES))), ENT_QUOTES, 'UTF-8'), 0, 160));
         } else {
             $description = trim(substr(html_entity_decode(strip_tags(stripslashes(htmlspecialchars_decode($content, ENT_QUOTES))), ENT_QUOTES, 'UTF-8'), 0, 160));
         }
         $description = preg_replace('/\\(%.*?%\\)/', " ", $description);
         $description = preg_replace('/\\{%.*?%\\}/', " ", $description);
         $description = preg_replace('/\\n/', " ", $description);
         $description = preg_replace('/\\r/', " ", $description);
         $description = preg_replace('/\\t/', " ", $description);
         $description = preg_replace('/ +/', " ", $description);
     }
     $keywords = array();
     $tags = preg_split("/\\s*,\\s*/", stripslashes(htmlspecialchars_decode($metak, ENT_QUOTES)));
     if (count($tags) > 0) {
         foreach ($tags as $tag) {
             if (substr(trim($tag), 0, 1) != '_') {
                 $keywords[] = trim($tag);
             }
         }
     }
     if (!$omit || !in_array('description', $omit)) {
         echo '<meta name="description" content="' . htmlspecialchars(trim($description)) . '" />' . "\n";
     }
     if (!$omit || !in_array('keywords', $omit)) {
         echo '<meta name="keywords" content="' . htmlspecialchars(implode(', ', $keywords)) . '" />' . "\n";
     }
     if ($full) {
         if (!$omit || !in_array('generator', $omit)) {
             echo '<meta name="generator" content="' . $site_full_name . '" />' . "\n";
         }
         if (!$omit || !in_array('canonical', $omit)) {
             echo '<link rel="canonical" href="' . find_i18n_url($url, $parent, $language) . '" />' . "\n";
         }
     }
     if (function_exists('get_scripts_frontend')) {
         get_scripts_frontend();
     }
     exec_action('theme-header');
 }
Example #3
0
/**
 * Get Page Footer HTML
 *
 * This will return footer html for a particular page. Right now
 * this function only executes a plugin hook so developers can hook into
 * the bottom of a site's template.
 *
 * @since 2.0
 * @uses exec_action
 *
 * @return string HTML for template header
 */
function get_footer()
{
    get_scripts_frontend(TRUE);
    exec_action('theme-footer');
}