function hook_feeds_parser_sources_alter in Feeds 6
Same name and namespace in other branches
- 8.2 feeds.api.php \hook_feeds_parser_sources_alter()
- 7.2 feeds.api.php \hook_feeds_parser_sources_alter()
- 7 feeds.api.php \hook_feeds_parser_sources_alter()
Alter mapping sources.
Use this hook to add additional mapping sources for any parser. Allows for registering a callback to be invoked at mapping time.
my_callback(FeedsImportBatch $batch, $key)
See also
locale_feeds_parser_sources_alter().
Related topics
3 functions implement hook_feeds_parser_sources_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- locale_feeds_parser_sources_alter in mappers/
locale.inc - Implementation of hook_feeds_parser_sources_alter().
- og_feeds_parser_sources_alter in mappers/
og.inc - Implementation of hook_feeds_parser_sources_alter().
- taxonomy_feeds_parser_sources_alter in mappers/
taxonomy.inc - Implementation of hook_feeds_parser_sources_alter().
1 invocation of hook_feeds_parser_sources_alter()
- FeedsParser::getMappingSources in plugins/
FeedsParser.inc - Declare the possible mapping sources that this parser produces.
File
- ./
feeds.api.php, line 143 - Documentation of Feeds hooks.
Code
function hook_feeds_parser_sources_alter(&$sources, $content_type) {
$sources['my_source'] = array(
'name' => t('Images in description element'),
'description' => t('Images occuring in the description element of a feed item.'),
'callback' => 'my_source_get_source',
);
}