summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2013-04-16 20:31:49 (GMT)
committerAlex Pott2013-04-16 20:31:49 (GMT)
commit23c27a8864531e96fecb2e2bf07da948605c2f34 (patch)
tree1e36c32f7b89bf2668264efe8f4fa4d9256460dd
parent9fc090c295826b102a54321e4c4569e62764951f (diff)
Issue #1948374 by duellj | joelpittet: #type 'table' allow attributes on table cells.
-rw-r--r--core/includes/theme.inc10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 88ab65d..47c99d9 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;
}