You are here

function addtoany_block in AddToAny Share Buttons 6.2

Same name and namespace in other branches
  1. 5.2 addtoany.module \addtoany_block()
  2. 6.3 addtoany.module \addtoany_block()

Implementation of hook_block().

File

./addtoany.module, line 41
Standalone module file to handle AddToAny button integration

Code

function addtoany_block($op = 'list', $delta = 0) {
  if ($op == 'list') {
    $blocks[0]['info'] = t('AddToAny button');
    return $blocks;
  }
  else {
    if ($op == 'view') {
      $block['subject'] = t('AddToAny');
      $block['content'] = _addtoany_create_button(menu_get_object());
      $block['cache'] = BLOCK_NO_CACHE;

      // Caching issue: http://drupal.org/node/610564
      return $block;
    }
  }
}