You are here

function hook_preprocess_icon in Icon API 7

Same name and namespace in other branches
  1. 8 icon.api.php \hook_preprocess_icon()

Implements hook_preprocess_icon().

See also

icon_preprocess_icon_image()

template_preprocess_icon()

1 function implements hook_preprocess_icon()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

template_preprocess_icon in includes/theme.inc
Implements hook_preprocess_icon().

File

./icon.api.php, line 135
icon.api.php Hooks and form elements provided by the Icon API module.

Code

function hook_preprocess_icon(&$variables) {
  $bundle =& $variables['bundle'];
  if ($bundle['render'] === 'my_render_hook' || $bundle['provider'] === 'my_provider' || $bundle['name'] === 'my_bundle') {

    // Add an additional custom class.
    $variables['attributes']['class'][] = 'my-custom-class';
  }
}