You are here

function facetapi_collapsible_theme_registry_alter in Facet API Collapsible 7

Implements hook_theme_registry_alter().

File

./facetapi_collapsible.module, line 21

Code

function facetapi_collapsible_theme_registry_alter(&$theme_registry) {

  // FacetAPI Collapsible only needs to inject or wrap these theming functions with additional markup.
  // When replacing the theme funciton, we need to save the origial array and invoke the original theming
  // function in ours. This allows compatibility with other modules and themes that have existing overrides.
  foreach (array(
    'facetapi_title',
    'facetapi_link_inactive',
    'facetapi_link_active',
  ) as $theme_function) {
    $theme_registry['facetapi_collapsible_' . $theme_function . '_original'] = $theme_registry[$theme_function];
    $theme_registry[$theme_function]['function'] = 'facetapi_collapsible_' . $theme_function;
  }
}