function theming_example_preprocess_form_element_label

Same name in other branches
  1. 4.0.x modules/theming_example/theming_example.module \theming_example_preprocess_form_element_label()

Implements hook_preprocess_HOOK().

Related topics

File

modules/theming_example/theming_example.module, line 144

Code

function theming_example_preprocess_form_element_label(&$variables) {
    if (!empty($variables['element']['#attributes']['data-strong'])) {
        $variables['title']['#prefix'] = '<strong>';
        $variables['title']['#suffix'] = '</strong>';
        unset($variables['#attributes']['data-strong']);
    }
}