_theme_table_cell
- Versions
- 4.6 – 4.7
_theme_table_cell($cell, $header = 0)- 5 – 7
_theme_table_cell($cell, $header = FALSE)
Code
includes/theme.inc, line 2118
<?php
function _theme_table_cell($cell, $header = FALSE) {
$attributes = '';
if (is_array($cell)) {
$data = isset($cell['data']) ? $cell['data'] : '';
// Cell's data property can be a string or a renderable array.
if (is_array($data)) {
$data = drupal_render($data);
}
$header |= isset($cell['header']);
unset($cell['data']);
unset($cell['header']);
$attributes = drupal_attributes($cell);
}
else {
$data = $cell;
}
if ($header) {
$output = "<th$attributes>$data</th>";
}
else {
$output = "<td$attributes>$data</td>";
}
return $output;
}
?>Login or register to post comments 