From 079dca8e17b47cfee0a80f4a683bb511c8fe5505 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 19 Oct 2009 01:30:07 +0000 Subject: - Patch #608036 by effulgentsia: add content_attributes() variable for tpl files, so RDF can be implemented better. --- includes/theme.inc | 7 +++++-- modules/block/block.tpl.php | 2 +- modules/comment/comment.tpl.php | 2 +- modules/field/theme/field.tpl.php | 2 +- modules/node/node.tpl.php | 2 +- themes/garland/block.tpl.php | 2 +- themes/garland/comment.tpl.php | 2 +- themes/garland/node.tpl.php | 2 +- 8 files changed, 12 insertions(+), 9 deletions(-) diff --git a/includes/theme.inc b/includes/theme.inc index e8c51d31c..bcceb3fb5 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -2078,9 +2078,11 @@ function template_preprocess(&$variables, $hook) { // Initialize html class attribute for the current hook. $variables['classes_array'] = array($hook); - // Initialize attributes for the top-level template entity and its title. + // Initialize attributes for the top-level template entity and its title and + // content. $variables['attributes_array'] = array(); $variables['title_attributes_array'] = array(); + $variables['content_attributes_array'] = array(); // Set default variables that depend on the database. $variables['is_admin'] = FALSE; @@ -2107,9 +2109,10 @@ function template_process(&$variables, $hook) { // Flatten out classes. $variables['classes'] = implode(' ', $variables['classes_array']); - // Flatten out attributes and title_attributes. + // Flatten out attributes, title_attributes, and content_attributes. $variables['attributes'] = drupal_attributes($variables['attributes_array']); $variables['title_attributes'] = drupal_attributes($variables['title_attributes_array']); + $variables['content_attributes'] = drupal_attributes($variables['content_attributes_array']); } /** diff --git a/modules/block/block.tpl.php b/modules/block/block.tpl.php index a1af14707..c77d57e32 100644 --- a/modules/block/block.tpl.php +++ b/modules/block/block.tpl.php @@ -46,7 +46,7 @@ >subject ?> -
+
>
diff --git a/modules/comment/comment.tpl.php b/modules/comment/comment.tpl.php index 2777b3eda..ffc0c3c99 100644 --- a/modules/comment/comment.tpl.php +++ b/modules/comment/comment.tpl.php @@ -66,7 +66,7 @@ ?> -
+
>
>
-
+
> $item) : ?>
>
diff --git a/modules/node/node.tpl.php b/modules/node/node.tpl.php index c05d7e8bf..ae03d400d 100644 --- a/modules/node/node.tpl.php +++ b/modules/node/node.tpl.php @@ -100,7 +100,7 @@
-
+
> >subject ?> -
+
>
diff --git a/themes/garland/comment.tpl.php b/themes/garland/comment.tpl.php index f973e5baa..2c3e1ca28 100644 --- a/themes/garland/comment.tpl.php +++ b/themes/garland/comment.tpl.php @@ -19,7 +19,7 @@ > -
+
>
diff --git a/themes/garland/node.tpl.php b/themes/garland/node.tpl.php index 5c02dfb9b..47f9cc974 100644 --- a/themes/garland/node.tpl.php +++ b/themes/garland/node.tpl.php @@ -17,7 +17,7 @@ -
+
>