You are here

function sharethis_block in ShareThis 6

Implementation of hook_block().

File

./sharethis.module, line 101
Provides the ShareThis service.

Code

function sharethis_block($op = 'list', $delta = 0, $edit = array()) {
  switch ($op) {
    case 'list':
      $blocks['sharethis'] = array(
        'info' => t('ShareThis'),
        'cache' => BLOCK_NO_CACHE,
      );
      return $blocks;
      break;
    case 'view':
      if ($delta == 'sharethis') {
        return array(
          'subject' => t('ShareThis'),
          'content' => theme('sharethis', drupal_get_title(), $_GET['q']),
        );
      }
      break;
  }
}