You are here

function block_class_preprocess_block in Block Class 6

Same name and namespace in other branches
  1. 8 block_class.module \block_class_preprocess_block()
  2. 6.2 block_class.module \block_class_preprocess_block()
  3. 7.2 block_class.module \block_class_preprocess_block()
  4. 7 block_class.module \block_class_preprocess_block()

Implementation of template_preprocess_block().

Make $block_class string available to block.tpl.php.

File

./block_class.module, line 22
Provides core logic for adding block classes.

Code

function block_class_preprocess_block(&$variables) {
  if (isset($variables['block_classes'])) {
    $variables['block_classes'] .= ' ' . block_class($variables['block']);
  }
  else {
    $variables['block_classes'] = block_class($variables['block']);
  }
}