You are here

function addthis_block in AddThis 5.2

Same name and namespace in other branches
  1. 6.3 addthis.module \addthis_block()
  2. 6.2 addthis.module \addthis_block()

Implementation of hook_block().

File

./addthis.module, line 173
Stand alone module file to handle AddThis button integration

Code

function addthis_block($op = 'list', $delta = 0) {
  if ($op == 'list') {
    $blocks[0]['info'] = t('AddThis button');
    return $blocks;
  }
  else {
    if ($op == 'view' && user_access('view addthis')) {
      $block['subject'] = t('AddThis');
      $block['content'] = _addthis_create_button();
      return $block;
    }
  }
}