function taxonomy_feeds_processor_targets_alter in Feeds 8.2
Same name and namespace in other branches
- 7 mappers/taxonomy.inc \taxonomy_feeds_processor_targets_alter()
Implements hook_feeds_processor_targets_alter().
File
- mappers/
taxonomy.inc, line 68 - On behalf implementation of Feeds mapping API for taxonomy.module.
Code
function taxonomy_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_name) {
foreach (field_info_instances($entity_type, $bundle_name) as $name => $instance) {
$info = field_info_field($name);
if ($info['type'] == 'taxonomy_term_reference') {
$targets[$name] = array(
'name' => check_plain($instance['label']),
'callback' => 'taxonomy_feeds_set_target',
'description' => t('The @label field of the entity.', array(
'@label' => $instance['label'],
)),
'summary_callback' => 'taxonomy_feeds_summary_callback',
'form_callback' => 'taxonomy_feeds_form_callback',
);
}
}
}