function bootstrap_text_format_wrapper

7.x-3.x text-format-wrapper.func.php bootstrap_text_format_wrapper(array $variables)

Returns HTML for a text format-enabled form element.

Parameters

array $variables: An associative array containing:

  • element: A render element containing #children and #description.

Return value

string The constructed HTML.

Related topics

Source templates/filter/text-format-wrapper.func.php (line 22)

function bootstrap_text_format_wrapper(array $variables) {
  $element = $variables['element'];
  $output = '<div class="text-format-wrapper">';
  $output .= $element['#children'];
  if (!empty($element['#description'])) {
    $output .= '<p class="help-block">' . $element['#description'] . '</p>';
  }
  $output .= "</div>\n";
  return $output;
}