function taxonomy_feeds_parser_sources_alter in Feeds 7
Same name and namespace in other branches
- 8.2 mappers/taxonomy.inc \taxonomy_feeds_parser_sources_alter()
 - 6 mappers/taxonomy.inc \taxonomy_feeds_parser_sources_alter()
 - 7.2 mappers/taxonomy.inc \taxonomy_feeds_parser_sources_alter()
 
Implements hook_feeds_parser_sources_alter().
File
- mappers/
taxonomy.inc, line 11  - Mapper that exposes a node's taxonomy vocabularies as mapping targets.
 
Code
function taxonomy_feeds_parser_sources_alter(&$sources, $content_type) {
  if (!empty($content_type)) {
    foreach (taxonomy_get_vocabularies($content_type) as $vocabulary) {
      $sources['parent:taxonomy:' . $vocabulary->machine_name] = array(
        'name' => t('Feed node: Taxonomy: @vocabulary', array(
          '@vocabulary' => $vocabulary->name,
        )),
        'description' => t('Taxonomy terms from feed node in given vocabulary.'),
        'callback' => 'taxonomy_feeds_get_source',
      );
    }
  }
}