diff --git a/includes/theme.inc b/includes/theme.inc index 3ac1dc90f37..352706effd6 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -2042,6 +2042,10 @@ 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. + $variables['attributes_array'] = array(); + $variables['title_attributes_array'] = array(); + // Set default variables that depend on the database. $variables['is_admin'] = FALSE; $variables['is_front'] = FALSE; @@ -2066,6 +2070,10 @@ function template_preprocess(&$variables, $hook) { function template_process(&$variables, $hook) { // Flatten out classes. $variables['classes'] = implode(' ', $variables['classes_array']); + + // Flatten out attributes and title_attributes. + $variables['attributes'] = drupal_attributes($variables['attributes_array']); + $variables['title_attributes'] = drupal_attributes($variables['title_attributes_array']); } /** diff --git a/modules/block/block.tpl.php b/modules/block/block.tpl.php index 77b1fa93839..961cb01b01d 100644 --- a/modules/block/block.tpl.php +++ b/modules/block/block.tpl.php @@ -35,9 +35,9 @@ * @see template_process() */ ?> -
>
+
>
diff --git a/themes/garland/block.tpl.php b/themes/garland/block.tpl.php index 50a79d36342..4d9e443e2c8 100644 --- a/themes/garland/block.tpl.php +++ b/themes/garland/block.tpl.php @@ -1,10 +1,10 @@ -subject ?>
+>subject ?>
diff --git a/themes/garland/comment.tpl.php b/themes/garland/comment.tpl.php index d664d236073..9a8959cc561 100644 --- a/themes/garland/comment.tpl.php +++ b/themes/garland/comment.tpl.php @@ -1,7 +1,7 @@ ->
+
>