You are here

function taxonomy_feeds_parser_sources_alter in Feeds 7.2

Same name and namespace in other branches
  1. 8.2 mappers/taxonomy.inc \taxonomy_feeds_parser_sources_alter()
  2. 6 mappers/taxonomy.inc \taxonomy_feeds_parser_sources_alter()
  3. 7 mappers/taxonomy.inc \taxonomy_feeds_parser_sources_alter()

Implements hook_feeds_parser_sources_alter().

File

mappers/taxonomy.inc, line 26
On behalf implementation of Feeds mapping API for taxonomy.module.

Code

function taxonomy_feeds_parser_sources_alter(array &$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',
      );
    }
  }
}