Commit 23c27a88 authored by alexpott's avatar alexpott

Issue #1948374 by duellj | joelpittet: #type 'table' allow attributes on table cells.

parent 9fc090c2
...@@ -1980,7 +1980,15 @@ function drupal_pre_render_table(array $element) { ...@@ -1980,7 +1980,15 @@ function drupal_pre_render_table(array $element) {
foreach (element_children($element[$first]) as $second) { foreach (element_children($element[$first]) as $second) {
// Assign the element by reference, so any potential changes to the // Assign the element by reference, so any potential changes to the
// original element are taken over. // original element are taken over.
$row['data'][] = array('data' => &$element[$first][$second]); $column = array('data' => &$element[$first][$second]);
// Apply wrapper attributes of second-level elements as table cell
// attributes.
if (isset($element[$first][$second]['#wrapper_attributes'])) {
$column += $element[$first][$second]['#wrapper_attributes'];
}
$row['data'][] = $column;
} }
$element['#rows'][] = $row; $element['#rows'][] = $row;
} }
......
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