You are here

function taxo_faceted_navigation_block_info in Taxonomy Facets 7

Implements hook_block_info().

File

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

Code

function taxo_faceted_navigation_block_info() {
  $blocks = array();
  $deltas = variable_get('taxo_faceted_block_ids', array());
  foreach (array_keys(module_invoke_all('taxo_faceted_navigation_blocks')) as $delta) {
    $deltas[] = $delta;
  }
  foreach ($deltas as $delta) {
    $vid = variable_get("taxo_faceted_navigation_{$delta}_tid", 1);
    $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;
}