You are here

function content_taxonomy_field_info_alter in Content Taxonomy 7

Implements hook_field_info_alter().

File

./content_taxonomy.module, line 57

Code

function content_taxonomy_field_info_alter(&$info) {

  // Use own options callback for handling additional configuration options.
  $info['taxonomy_term_reference']['settings']['options_list_callback'] = 'content_taxonomy_allowed_values';

  // Add depth option.
  foreach ($info['taxonomy_term_reference']['settings']['allowed_values'] as $key => $values) {
    $info['taxonomy_term_reference']['settings']['allowed_values'][$key]['depth'] = 0;
  }
}