Commit 0f1a044e authored by alexpott's avatar alexpott

Issue #2208585 by googletorp, quicksketch: Make #wrapper_attributes official and document it

parent 4c49e1e5
...@@ -403,15 +403,9 @@ function template_preprocess_form_element(&$variables) { ...@@ -403,15 +403,9 @@ function template_preprocess_form_element(&$variables) {
// \Drupal::formBuilder()->doBuildForm(). // \Drupal::formBuilder()->doBuildForm().
$element += array( $element += array(
'#title_display' => 'before', '#title_display' => 'before',
'#wrapper_attributes' => array(),
); );
$variables['attributes'] = $element['#wrapper_attributes'];
// Take over any #wrapper_attributes defined by the element.
// @todo Temporary hack for #type 'item'.
// @see http://drupal.org/node/1829202
$variables['attributes'] = array();
if (isset($element['#wrapper_attributes'])) {
$variables['attributes'] = $element['#wrapper_attributes'];
}
// Add element #id for #type 'item'. // Add element #id for #type 'item'.
if (isset($element['#markup']) && !empty($element['#id'])) { if (isset($element['#markup']) && !empty($element['#id'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment