diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 88ab65d72dcf429cb9a510cde1c6bad9a5465de2..47c99d9126459eec5d42ef6025a7adc1319874e9 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1980,7 +1980,15 @@ function drupal_pre_render_table(array $element) { foreach (element_children($element[$first]) as $second) { // Assign the element by reference, so any potential changes to the // 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; }