function addtoany_block in AddToAny Share Buttons 6.3
Same name and namespace in other branches
- 5.2 addtoany.module \addtoany_block()
- 6.2 addtoany.module \addtoany_block()
Implementation of hook_block().
Parameters
object $op [optional]:
object $delta [optional]:
File
- ./
addtoany.module, line 52 - 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;
}
}
}