diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-09-15 20:58:17 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-09-15 20:58:17 +0000 |
commit | 5971f1e645f96f25fca2342f4de7b0287657f018 (patch) | |
tree | 9c279c56351997683a7bf9f409a62dd7046b8f85 | |
parent | da74bce9bc791809dd5b0bd16385ae3f06e6058a (diff) | |
download | brdo-5971f1e645f96f25fca2342f4de7b0287657f018.tar.gz brdo-5971f1e645f96f25fca2342f4de7b0287657f018.tar.bz2 |
- Patch #28777 by Neil: use <thead> and <tbody> in theme_table().
-rw-r--r-- | includes/theme.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 7a7e7e66f..47c2ff29f 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -697,8 +697,7 @@ function theme_submenu($links) { * @return * An HTML string representing the table. */ -function theme_table($header, $rows, $attributes = NULL, $caption = NULL) { - +function theme_table($header, $rows, $attributes = array(), $caption = NULL) { $output = '<table'. drupal_attributes($attributes) .">\n"; if (isset($caption)) { @@ -708,15 +707,16 @@ function theme_table($header, $rows, $attributes = NULL, $caption = NULL) { // Format the table header: if (count($header)) { $ts = tablesort_init($header); - $output .= ' <tr>'; + $output .= ' <thead><tr>'; foreach ($header as $cell) { $cell = tablesort_header($cell, $header, $ts); $output .= _theme_table_cell($cell, 1); } - $output .= " </tr>\n"; + $output .= " </tr></thead>\n"; } // Format the table rows: + $output .= "<tbody>\n"; if (count($rows)) { foreach ($rows as $number => $row) { $attributes = array(); @@ -756,7 +756,7 @@ function theme_table($header, $rows, $attributes = NULL, $caption = NULL) { } } - $output .= "</table>\n"; + $output .= "</tbody></table>\n"; return $output; } |