root / drupal7 / sites / all / themes / bootstrap / theme / icon / icon.vars.php @ 87dbc3bf
1 | 87dbc3bf | Benjamin Luce | <?php
|
---|---|---|---|
2 | /**
|
||
3 | * @file
|
||
4 | * icon.vars.php
|
||
5 | */
|
||
6 | |||
7 | /**
|
||
8 | * Implements hook_preprocess_icon().
|
||
9 | *
|
||
10 | * Bootstrap requires an additional "glyphicon" class for all icons.
|
||
11 | *
|
||
12 | * @see icon_preprocess_icon_image()
|
||
13 | * @see template_preprocess_icon()
|
||
14 | */
|
||
15 | function bootstrap_preprocess_icon(&$variables) { |
||
16 | $bundle = &$variables['bundle']; |
||
17 | if ($bundle['provider'] === 'bootstrap') { |
||
18 | $variables['attributes']['class'][] = 'glyphicon'; |
||
19 | } |
||
20 | } |