From 0a062a52975209a2a004f3dcaee22f9c7bdb4fbc Mon Sep 17 00:00:00 2001 From: bachy Date: Sat, 4 Feb 2012 20:44:28 +0100 Subject: [PATCH] preprocess_html add icons Signed-off-by: bachy --- template.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/template.php b/template.php index 6f4dd498..d999e920 100644 --- a/template.php +++ b/template.php @@ -96,6 +96,30 @@ function guibik_preprocess_page(&$vars) { if ($theme === 'guibik') _rubik_local_tasks($vars); +} + +function guibik_preprocess_html(&$vars){ + + $heads['icon'] = array( + '#tag' => 'link', + '#attributes' => array( + 'href' => base_path() . path_to_theme() .'/icon.png', + 'rel' => 'shortcut icon', + 'type' => 'image/png', + ), + ); + + + $heads['apple-touch-icon'] = array( + '#tag' => 'link', + '#attributes' => array( + 'href' => base_path() . path_to_theme() .'/apple-touch-icon.png', + 'rel' => 'apple-touch-icon', + ), + ); + + foreach ($heads as $type=>$head) + drupal_add_html_head($head, $type); }