Same name and namespace in other branches
  1. 4.7.x includes/theme.inc \_theme_table_cell()
  2. 5.x includes/theme.inc \_theme_table_cell()
  3. 6.x includes/theme.inc \_theme_table_cell()
  4. 7.x includes/theme.inc \_theme_table_cell()

End of "defgroup themeable".

Related topics

1 call to _theme_table_cell()
theme_table in includes/theme.inc
Return a themed table.

File

includes/theme.inc, line 926
The theme system, which controls the output of Drupal.

Code

function _theme_table_cell($cell, $header = 0) {
  $attributes = '';
  if (is_array($cell)) {
    $data = $cell['data'];
    foreach ($cell as $key => $value) {
      if ($key != 'data') {
        $attributes .= " {$key}=\"{$value}\"";
      }
    }
  }
  else {
    $data = $cell;
  }
  if ($header) {
    $output = "<th{$attributes}>{$data}</th>";
  }
  else {
    $output = "<td{$attributes}>{$data}</td>";
  }
  return $output;
}