You are here

function similarterms_block_info in Similar By Terms 7

Implements hook_block_info().

File

./similarterms.module, line 48
Similar By Terms module displays a block with similar content based on taxonomy terms.

Code

function similarterms_block_info() {
  $blocks['all'] = array(
    'info' => t('Similar entries from ANY vocabulary.'),
    'cache' => DRUPAL_CACHE_PER_ROLE | DRUPAL_CACHE_PER_PAGE,
  );
  foreach (taxonomy_get_vocabularies() as $v) {
    $blocks[$v->vid] = array(
      'info' => t('Similar entries from the @vocab vocabulary.', array(
        '@vocab' => $v->name,
      )),
      'cache' => DRUPAL_CACHE_PER_ROLE | DRUPAL_CACHE_PER_PAGE,
    );
  }
  return $blocks;
}