Projet

Général

Profil

Paste
Télécharger (594 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / bootstrap / templates / icon / icon.vars.php @ 38c269d5

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