You are here

function addtoany_block_view in AddToAny Share Buttons 5.0

Same name and namespace in other branches
  1. 7.4 addtoany.module \addtoany_block_view()
  2. 7 addtoany.module \addtoany_block_view()
  3. 7.3 addtoany.module \addtoany_block_view()

Implements hook_block_view().

File

./addtoany.module, line 103
Stand alone module file to handle AddToAny button integration

Code

function addtoany_block_view($delta = 0) {
  $block = array();
  switch ($delta) {
    case 'addtoany button':
      if (user_access('view addtoany')) {
        $block['subject'] = t('AddToAny');
        $block['content'] = _addtoany_create_button(menu_get_object());
      }
      break;
  }
  return $block;
}