root / drupal7 / sites / all / themes / bootstrap / templates / filter / text-format-wrapper.func.php @ 5024cef7
1 |
<?php
|
---|---|
2 |
|
3 |
/**
|
4 |
* @file
|
5 |
* Stub file for bootstrap_text_format_wrapper().
|
6 |
*/
|
7 |
|
8 |
/**
|
9 |
* Returns HTML for a text format-enabled form element.
|
10 |
*
|
11 |
* @param array $variables
|
12 |
* An associative array containing:
|
13 |
* - element: A render element containing #children and #description.
|
14 |
*
|
15 |
* @return string
|
16 |
* The constructed HTML.
|
17 |
*
|
18 |
* @see theme_text_format_wrapper()
|
19 |
*
|
20 |
* @ingroup theme_functions
|
21 |
*/
|
22 |
function bootstrap_text_format_wrapper(array $variables) { |
23 |
$element = $variables['element']; |
24 |
$output = '<div class="text-format-wrapper">'; |
25 |
$output .= $element['#children']; |
26 |
if (!empty($element['#description'])) { |
27 |
$output .= '<p class="help-block">' . $element['#description'] . '</p>'; |
28 |
} |
29 |
$output .= "</div>\n"; |
30 |
return $output; |
31 |
} |