Projet

Général

Profil

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

root / drupal7 / sites / all / themes / bootstrap / theme / system / links.vars.php @ 87dbc3bf

1
<?php
2
/**
3
 * @file
4
 * links.vars.php
5
 */
6

    
7
/**
8
 * Implements hook_preprocess_links().
9
 */
10
function bootstrap_preprocess_links(&$variables) {
11
  if (isset($variables['attributes']) && isset($variables['attributes']['class'])) {
12
    $string = is_string($variables['attributes']['class']);
13
    if ($string) {
14
      $variables['attributes']['class'] = explode(' ', $variables['attributes']['class']);
15
    }
16

    
17
    if ($key = array_search('inline', $variables['attributes']['class'])) {
18
      $variables['attributes']['class'][$key] = 'list-inline';
19
    }
20

    
21
    if ($string) {
22
      $variables['attributes']['class'] = implode(' ', $variables['attributes']['class']);
23
    }
24
  }
25
}