You are here

function hs_taxonomy_hierarchical_select_entity_count in Hierarchical Select 6.3

Same name and namespace in other branches
  1. 5.3 modules/hs_taxonomy.module \hs_taxonomy_hierarchical_select_entity_count()
  2. 7.3 modules/hs_taxonomy.module \hs_taxonomy_hierarchical_select_entity_count()

Implementation of hook_hierarchical_select_entity_count().

1 call to hs_taxonomy_hierarchical_select_entity_count()
hs_content_taxonomy_hierarchical_select_entity_count in modules/hs_content_taxonomy.module
Implementation of hook_hierarchical_select_entity_count().

File

modules/hs_taxonomy.module, line 549
Implementation of the Hierarchical Select API for the Taxonomy module.

Code

function hs_taxonomy_hierarchical_select_entity_count($item, $params) {

  // Allow restricting entity count by node type.
  if ($params['entity_count_for_node_type']) {
    return hs_taxonomy_term_count_nodes($item, $params['entity_count_for_node_type']);
  }
  else {
    return hs_taxonomy_term_count_nodes($item);
  }
}