function hansel_taxonomy_switch_vocabulary_compare in Hansel breadcrumbs 7
Same name and namespace in other branches
- 8 taxonomy/hansel_taxonomy.module \hansel_taxonomy_switch_vocabulary_compare()
Callback for "taxonomy vocabulary" switch to compare a given value.
Parameters
array $arguments:
string $value:
Return value
boolean
1 string reference to 'hansel_taxonomy_switch_vocabulary_compare'
- hansel_taxonomy_hansel_switch_types in taxonomy/hansel_taxonomy.module 
- Implements hook_hansel_switch_types().
File
- taxonomy/hansel_taxonomy.module, line 163 
- Hansel taxonomy integration
Code
function hansel_taxonomy_switch_vocabulary_compare($arguments, $value) {
  if (drupal_strtolower(hansel_arg(0)) == 'taxonomy' && drupal_strtolower(hansel_arg(1)) == 'term' && is_numeric(hansel_arg(2))) {
    if (($term = taxonomy_term_load(hansel_arg(2))) && ($vocabulary = taxonomy_vocabulary_load($term->vid))) {
      return drupal_strtolower($vocabulary->machine_name) == drupal_strtolower($value);
    }
  }
  return FALSE;
}