summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/theme.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index 5046fc19f..d6ded08ed 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -692,13 +692,19 @@ function theme_submenu($links) {
*
* @param $attributes
* An array of HTML attributes to apply to the table tag.
+ * @param $caption
+ * A localized string to use for the <caption> tag.
* @return
* An HTML string representing the table.
*/
-function theme_table($header, $rows, $attributes = NULL) {
+function theme_table($header, $rows, $attributes = NULL, $caption = NULL) {
$output = '<table'. drupal_attributes($attributes) .">\n";
+ if (isset($caption)) {
+ $output .= '<caption>'. $caption ."</caption>\n";
+ }
+
// Format the table header:
if (count($header)) {
$ts = tablesort_init($header);