You are here

function hs_taxonomy_views_hierarchical_select_root_level in Hierarchical Select 6.3

Same name and namespace in other branches
  1. 5.3 modules/hs_taxonomy_views.module \hs_taxonomy_views_hierarchical_select_root_level()

Implementation of hook_hierarchical_select_root_level().

File

modules/hs_taxonomy_views.module, line 400
Implementation of the Hierarchical Select API for the Taxonomy module's Views exposed filters.

Code

function hs_taxonomy_views_hierarchical_select_root_level($params) {
  $any_label = variable_get('views_exposed_filter_any_label', 'old_any') === 'old_any' ? '<' . t('Any') . '>' : '- ' . t('Any') . ' -';
  $root_level = $params['optional'] ? array(
    HS_TAXONOMY_VIEWS_ANY_OPTION => $any_label,
  ) : array();
  $root_level += hs_taxonomy_hierarchical_select_root_level($params);
  return $root_level;
}