You are here

function addthis_block in AddThis 6.3

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

Implementation of hook_block().

File

./addthis.module, line 97
Provides integration with the AddThis.com bookmarking & sharing service.

Code

function addthis_block($op = 'list', $delta = 0) {
  switch ($op) {
    case 'list':
      $blocks[0]['info'] = t('AddThis widget');
      $blocks[0]['cache'] = BLOCK_NO_CACHE;
      return $blocks;
    case 'view':
      $addthis_widget_type = variable_get('addthis_widget_type', 'addthis_button');
      $block['subject'] = t('AddThis');
      $block['content'] = theme($addthis_widget_type);
      return $block;
  }
}