Quellcode durchsuchen

preprocess_html

add icons

Signed-off-by: bachy <git@g-u-i.net>
bachy vor 13 Jahren
Ursprung
Commit
0a062a5297
1 geänderte Dateien mit 24 neuen und 0 gelöschten Zeilen
  1. 24 0
      template.php

+ 24 - 0
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);
 	
 	
 }