icons.inc 920 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * @file
  4. * icons.inc
  5. * Provide Bootstrap Glyphicons support via the Icon API module.
  6. */
  7. require_once dirname(__FILE__) . '/common.inc';
  8. /**
  9. * Implements hook_icon_providers().
  10. */
  11. function bootstrap_icon_providers() {
  12. $providers['bootstrap'] = array(
  13. 'title' => t('Bootstrap'),
  14. 'url' => 'http://getbootstrap.com/components/#glyphicons',
  15. );
  16. return $providers;
  17. }
  18. /**
  19. * Implements hook_icon_bundles().
  20. */
  21. function bootstrap_icon_bundles() {
  22. $bundles = array();
  23. if (_bootstrap_glyphicons_supported()) {
  24. $bundles['bootstrap'] = array(
  25. 'render' => 'sprite',
  26. 'provider' => 'bootstrap',
  27. 'title' => t('Bootstrap'),
  28. 'version' => t('Icons by Glyphicons'),
  29. 'variations' => array(
  30. 'icon-white' => t('White'),
  31. ),
  32. 'settings' => array(
  33. 'tag' => 'span',
  34. ),
  35. 'icons' => _bootstrap_glyphicons(),
  36. );
  37. }
  38. return $bundles;
  39. }