You are here

function taxonomy_node_import_fields_alter in Node import 6

Implementation of hook_node_import_fields_alter().

File

supported/taxonomy.inc, line 324
Support file for the core taxonomy module.

Code

function taxonomy_node_import_fields_alter(&$fields, $type) {
  foreach ($fields as $fieldname => $fieldinfo) {
    if ($fieldinfo['input_format'] == 'taxonomy_term') {
      $vocab = $fieldinfo['vocabulary'];
      if (!$vocab->tags) {
        $fields[$fieldname]['preprocess'][] = 'node_import_check_taxonomy_term';
      }
      $fields[$fieldname]['tips'][] = t('Taxonomy term (by tid, name or synonym).');
    }
  }
}