root / drupal7 / sites / all / themes / bootstrap / templates / icon / icon.vars.php @ 38c269d5
1 |
<?php
|
---|---|
2 |
/**
|
3 |
* @file
|
4 |
* Stub file for "icon" theme hook [pre]process functions.
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
* Pre-processes variables for the "icon" theme hook.
|
9 |
*
|
10 |
* Bootstrap requires an additional "glyphicon" class for all icons.
|
11 |
*
|
12 |
* See theme function for list of available variables.
|
13 |
*
|
14 |
* @see icon_preprocess_icon_image()
|
15 |
* @see template_preprocess_icon()
|
16 |
* @see theme_icon()
|
17 |
*
|
18 |
* @ingroup theme_preprocess
|
19 |
*/
|
20 |
function bootstrap_preprocess_icon(&$variables) { |
21 |
$bundle = &$variables['bundle']; |
22 |
if ($bundle['provider'] === 'bootstrap') { |
23 |
$variables['attributes']['class'][] = 'glyphicon'; |
24 |
} |
25 |
} |