function taxonomy_feeds_processor_targets_alter in Feeds 7
Same name and namespace in other branches
- 8.2 mappers/taxonomy.inc \taxonomy_feeds_processor_targets_alter()
Implements hook_feeds_processor_targets_alter().
File
- mappers/
taxonomy.inc, line 44 - Mapper that exposes a node's taxonomy vocabularies as mapping targets.
Code
function taxonomy_feeds_processor_targets_alter(&$targets, $entity_type, $content_type) {
foreach (field_info_instances($entity_type, $content_type) as $name => $instance) {
$info = field_info_field($name);
if ($info['type'] == 'taxonomy_term_reference') {
$targets[$name] = array(
'name' => $instance['label'],
'callback' => 'taxonomy_feeds_set_target',
'description' => t('The @label field of the node.', array(
'@label' => $instance['label'],
)),
);
}
}
}