You are here

function sharerich_block_view in Sharerich 7.2

Same name and namespace in other branches
  1. 7.3 sharerich.module \sharerich_block_view()
  2. 7 sharerich.module \sharerich_block_view()

Implements hook_block_view().

File

./sharerich.module, line 185

Code

function sharerich_block_view($delta = '') {
  $block = array();

  // If this is 32, this should be an md5 hash.
  if (drupal_strlen($delta) == 32) {
    $hashes = variable_get('sharerich_block_hashes', array());
    if (!empty($hashes[$delta])) {
      $delta = $hashes[$delta];
    }
  }
  $sharerich_set = sharerich_set_load($delta);
  $block['content'] = sharerich_get_buttons($sharerich_set, NULL);
  return $block;
}