You are here

function block_class_preprocess_block in Block Class 7

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. 6 block_class.module \block_class_preprocess_block()
  4. 7.2 block_class.module \block_class_preprocess_block()

Implements theme_preprocess_block().

Extend block's classes with any user defined classes.

File

./block_class.module, line 29
Enhanced control over the CSS Classes of any Block.

Code

function block_class_preprocess_block(&$vars) {
  $classes = trim(block_class($vars['block']));
  if (!empty($classes)) {
    $vars['classes_array'] = array_merge($vars['classes_array'], explode(' ', $classes));
  }
}