icons.inc 823 B

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