You are here

function taxonomy_crumbs_plugins in Crumbs, the Breadcrumbs suite 7.2

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 plugins/crumbs.taxonomy.inc \taxonomy_crumbs_plugins()

Implements hook_crumbs_plugins()

Parameters

crumbs_InjectedAPI_hookCrumbsPlugins $api:

File

plugins/crumbs.taxonomy.inc, line 9

Code

function taxonomy_crumbs_plugins($api) {
  $api
    ->multiPlugin('termParent');
  foreach (field_info_fields() as $field_name => $field_info) {
    if ($field_info['type'] === 'taxonomy_term_reference') {
      $plugin = new crumbs_EntityPlugin_Field_TermReference($field_name, $field_info['bundles']);
      $api
        ->entityParentPlugin('termReference.' . $field_name, $plugin, array_keys($field_info['bundles']));
    }
  }
  $api
    ->disabledByDefault('termReference.*');
}