Projet

Général

Profil

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

root / drupal7 / sites / all / themes / bootstrap / theme / system / container.func.php @ 87dbc3bf

1
<?php
2
/**
3
 * @file
4
 * container.func.php
5
 */
6

    
7
/**
8
 * Overrides theme_container().
9
 */
10
function bootstrap_container($variables) {
11
  $element = $variables['element'];
12

    
13
  // Special handling for form elements.
14
  if (isset($element['#array_parents'])) {
15
    // Assign an html ID.
16
    if (!isset($element['#attributes']['id'])) {
17
      $element['#attributes']['id'] = $element['#id'];
18
    }
19
    // Add classes.
20
    $element['#attributes']['class'][] = 'form-wrapper';
21
    $element['#attributes']['class'][] = 'form-group';
22
  }
23

    
24
  return '<div' . drupal_attributes($element['#attributes']) . '>' . $element['#children'] . '</div>';
25
}