function metatags_quick_feeds_parser_sources_alter in Meta tags quick 8.3
Same name and namespace in other branches
- 7.2 metatags_quick.feeds.inc \metatags_quick_feeds_parser_sources_alter()
Implements hook_feeds_parser_sources_alter().
File
- ./
metatags_quick.feeds.inc, line 11 - Code is effectively a port of the Feeds code from the References module.
Code
function metatags_quick_feeds_parser_sources_alter(&$sources, $content_type) {
if (!empty($content_type)) {
$fields = field_info_fields();
foreach ($fields as $field) {
if ($field['type'] == 'metatags_quick' && isset($field['bundles']['node']) && in_array($content_type, $field['bundles']['node'])) {
$sources['parent:metatags_quick:' . $field['meta_name']] = array(
'name' => t('Feed node: Metatag: @meta_name', array(
'@meta_name' => $field['meta_name'],
)),
'description' => t('Metatags the parent feed node.'),
'callback' => 'metatags_quick_feeds_get_source',
);
}
}
}
return $sources;
}