commit f048f6b334d402908f69ed74dc0650294aded367 Author: Shane Auckland Date: Thu May 9 18:02:20 2013 +0100 rerolling diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 0d0e739..dc9fb35 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2686,9 +2686,6 @@ function template_preprocess(&$variables, $hook) { 'title_attributes' => array(), 'content_attributes' => array(), ); - - // Initialize html class attribute for the current hook. - $variables['attributes']['class'][] = drupal_html_class($hook); } /** @@ -3169,6 +3166,7 @@ function template_preprocess_region(&$variables) { $variables['content'] = $variables['elements']['#children']; $variables['region'] = $variables['elements']['#region']; + $variables['attributes']['class'][] = 'region'; $variables['attributes']['class'][] = drupal_region_class($variables['region']); $variables['theme_hook_suggestions'][] = 'region__' . $variables['region']; } diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 57f1572..8d15422 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -545,6 +545,7 @@ function template_preprocess_block(&$variables) { // Create the $content variable that templates expect. $variables['content'] = $variables['elements']['#children']; + $variables['attributes']['class'][] = 'block'; $variables['attributes']['class'][] = drupal_html_class('block-' . $variables['block']->module); // Add default class for block content. diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 6d0d003..b9208a1 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1646,6 +1646,7 @@ function template_preprocess_comment(&$variables) { } // Gather comment classes. + $variables['attributes']['class'][] = 'comment'; // 'published' class is not needed, it is either 'preview' or 'unpublished'. if ($variables['status'] != 'published') { $variables['attributes']['class'][] = $variables['status'];