This module provides integration for icon bundles and icon providers throughout Drupal.

Integrations

  • icon_block - icon support for blocks.
  • icon_menu - icon support for menu items.
  • icon_field - icon support on field-able entities.
  • icon_filter - icon support as a filter for text-area fields.

Providers (via module or theme)

API/Documentation

Icon API comes with extensive documentation on how to integrate your module or service provider. If you need help, look at the previous modules/themes as examples.

Icon Filter Sub-Module

Add an icon inside formatted text-area fields that have the icon filter enabled: [icon:%bundle:%icon].
%bundle is the bundle machine name, like: my_bundle
%icon is the icon machine name, like: my_icon

Render an icon anywhere!

All you need to know is the bundle's machine name and the icon machine name, Icon API handles the rest!

<?php
  $element
[] = array(
   
'#theme' => 'icon',
   
'#bundle' => 'my_bundle',
   
'#icon' => 'my_icon',
  );
  print
drupal_render($element);
?>

Project Information

Downloads