You are here

function _blockanimate_get_block_attributes in BlockAnimate 7

Helper function.

Returns an array of WOW Javascript attributes for a block which has an animation associated to.

1 call to _blockanimate_get_block_attributes()
_blockanimate_add_js_classes_and_attributes in ./blockanimate.module
Extend block's classes and attributes.

File

./blockanimate.module, line 309
Add CSS3 cross-browser animation to any Drupal block.

Code

function _blockanimate_get_block_attributes($block) {
  $block_attributes = array();
  if ($block->animate_css_wow_duration != -1) {
    $block_attributes['data-wow-duration'] = check_plain($block->animate_css_wow_duration) . 's';
  }
  if ($block->animate_css_wow_delay != -1) {
    $block_attributes['data-wow-delay'] = check_plain($block->animate_css_wow_delay) . 's';
  }
  if ($block->animate_css_wow_offset != -1) {
    $block_attributes['data-wow-offset'] = check_plain($block->animate_css_wow_offset);
  }
  if ($block->animate_css_wow_iteration != -1) {
    $block_attributes['data-wow-iteration'] = check_plain($block->animate_css_wow_iteration);
  }
  return $block_attributes;
}