I'm theming a Drupal 7 site and I'd like to add a class to all the blocks in a given region using preprocess_block().
I think this should work, but it doesn't seem to:
function MYTHEME_preprocess_block(&$variables) {
// Other stuff in this function
$variables['title_attributes_array']['class'][] = 'title';
$variables['classes_array'][]='clearfix';
// Now I want to add a 'col-md-4' class to all the blocks in the 'bottom-content' region
if($variables['block']->region == 'bottom-content') {
$variables['classes_array'][]='col-md-4';
}
}
Any ideas why this isn't working?