function blockanimate_preprocess_panels_pane in BlockAnimate 7
Implements hook_preprocess_HOOK().
Extend panel block's classes and attributes with animate css classes and attributes.
File
- ./
blockanimate.module, line 53 - Add CSS3 cross-browser animation to any Drupal block.
Code
function blockanimate_preprocess_panels_pane(&$vars) {
if ($vars['pane']->type != 'block') {
return;
}
// Infer the block's $module and $delta from the pane subtype.
$block_parts = explode('-', $vars['pane']->subtype);
// Load the block based on the block parts.
$block = block_load($block_parts[0], $block_parts[1]);
// Add a generic 'module type' pane class.
$vars['classes_array'][] = drupal_html_class('pane-' . $block->module);
_blockanimate_add_js_classes_and_attributes($block, $vars);
}