Guest User

Untitled

a guest
Aug 21st, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. /**
  2. * Apple touch icons.
  3. * Create icons in sizes 57x57 (iPhone low res), 72x72 (iPad) and 114x114 (iPhone high res)
  4. */
  5.  
  6. // iPhone.
  7. $icons['iphone_icon'] = array(
  8. 'href' => drupal_get_path('theme','ODDSITE') . '/apple-touch-icon-iphone.png',
  9. 'rel' => 'apple-touch-icon',
  10. );
  11. // iPad.
  12. $icons['ipad_icon'] = array(
  13. 'href' => drupal_get_path('theme','ODDSITE') . '/apple-touch-icon-ipad.png',
  14. 'rel' => 'apple-touch-icon',
  15. 'sizes' => '72x72',
  16. );
  17. // iPhone 4.
  18. $icons['iphone4_icon'] = array(
  19. 'href' => drupal_get_path('theme','ODDSITE') . '/apple-touch-icon-iphone4.png',
  20. 'rel' => 'apple-touch-icon',
  21. 'sizes' => '114x114',
  22. );
  23. // Add the icons to <head>.
  24. foreach ($icons as $key => $icon) {
  25. $element = array(
  26. '#tag' => 'link',
  27. '#attributes' => array(
  28. 'href' => $icon['href'],
  29. 'rel' => $icon['rel'],
  30. 'sizes' => $icon['sizes'],
  31. ),
  32. );
  33. drupal_add_html_head($element, $key);
  34. }
Add Comment
Please, Sign In to add comment