You are here

function theme_icon_sprite in Icon API 8

Same name and namespace in other branches
  1. 7 includes/render.inc \theme_icon_sprite()

Implements theme_icon_RENDER_HOOK().

Return a tag with sprite class name of requested icon.

File

includes/render.inc, line 98
render.inc Provides hooks and theme callbacks for default render hooks. @TODO add a "sprite" render hook.

Code

function theme_icon_sprite($variables) {
  $bundle = $variables['bundle'];
  $icon = $variables['icon'];
  $tag = $bundle['settings']['tag'];
  $content = $bundle['settings']['content'];
  return '<' . $tag . drupal_attributes($variables['attributes']) . '>' . $content . '</' . $tag . '>';
}