You are here

function taxonomy_crumbs_plugins in Crumbs, the Breadcrumbs suite 7

Same name and namespace in other branches
  1. 6.2 plugins/crumbs.taxonomy.inc \taxonomy_crumbs_plugins()
  2. 6 plugins/crumbs.taxonomy.inc \taxonomy_crumbs_plugins()
  3. 7.2 plugins/crumbs.taxonomy.inc \taxonomy_crumbs_plugins()

Implements hook_crumbs_plugins()

File

plugins/crumbs.taxonomy.inc, line 7

Code

function taxonomy_crumbs_plugins($api) {
  $api
    ->multiPlugin('termParent');
  foreach (field_info_fields() as $key => $info) {
    if ($info['type'] == 'taxonomy_term_reference') {
      foreach ($info['bundles'] as $entity_type => $bundles) {
        $class = '_taxonomy_CrumbsMultiPlugin_termReference_' . $entity_type;
        if (class_exists($class)) {
          $plugin = new $class($key, $bundles);
          $api
            ->multiPlugin("termReference.{$key}.{$entity_type}", $plugin);
        }
      }
    }
  }
  $api
    ->disabledByDefault('termReference.*');
}