Projet

Général

Profil

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

root / drupal7 / sites / all / themes / bootstrap / templates / filter / text-format-wrapper.func.php @ 024de6ea

1
<?php
2
/**
3
 * @file
4
 * Stub file for bootstrap_text_format_wrapper().
5
 */
6

    
7
/**
8
 * Returns HTML for a text format-enabled form element.
9
 *
10
 * @param array $variables
11
 *   An associative array containing:
12
 *   - element: A render element containing #children and #description.
13
 *
14
 * @return string
15
 *   The constructed HTML.
16
 *
17
 * @see theme_text_format_wrapper()
18
 *
19
 * @ingroup theme_functions
20
 */
21
function bootstrap_text_format_wrapper($variables) {
22
  $element = $variables['element'];
23
  $output = '<div class="text-format-wrapper">';
24
  $output .= $element['#children'];
25
  if (!empty($element['#description'])) {
26
    $output .= '<p class="help-block">' . $element['#description'] . '</p>';
27
  }
28
  $output .= "</div>\n";
29
  return $output;
30
}