You are here

function taxonomy_facets_block_info in Taxonomy Facets 7.2

Same name and namespace in other branches
  1. 7.3 taxonomy_facets.module \taxonomy_facets_block_info()

Implements hook_block_info().

File

./taxonomy_facets.module, line 193
Taxo Faceted Navigation module code.

Code

function taxonomy_facets_block_info() {
  $blocks = array();
  $deltas = variable_get('taxo_faceted_block_ids', array());
  foreach (array_keys(module_invoke_all('taxonomy_facets_blocks')) as $delta) {
    $deltas[] = $delta;
  }
  foreach ($deltas as $delta) {
    $vid = variable_get("taxonomy_facets_{$delta}_tid", 2);
    $taxonomy_name = check_plain(taxonomy_vocabulary_load($vid)->name);
    $blocks[$delta]['info'] = t('Taxo Faceted Filter: ') . t($taxonomy_name);

    // Menu blocks can't be cached because each menu item can have
    // a custom access callback. menu.inc manages its own caching.
    $blocks[$delta]['cache'] = DRUPAL_CACHE_PER_PAGE;
  }
  return $blocks;
}