function views_rss_field_formatter_info in Views RSS 6
Implementation of hook_field_formatter_info().
File
- ./
views_rss.module, line 71
Code
function views_rss_field_formatter_info() {
$formatters = array(
// Generic image formatter for <enclosure> element.
'views_rss_enclosure_image' => array(
'label' => t('RSS enclosure element: image: original size'),
'field types' => array(
'image',
'filefield',
),
),
// Generic file formatter for <enclosure> element.
'views_rss_enclosure_file' => array(
'label' => t('RSS enclosure element: file'),
'field types' => array(
'filefield',
),
),
);
// Additional formatters for imagecache module.
if (module_exists('imagecache')) {
foreach (imagecache_presets() as $preset) {
// Imagecache image formatter for <enclosure> element.
$formatters['views_rss_enclosure_image' . $preset['presetname']] = array(
'label' => t('RSS enclosure element: image: @preset', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'image',
'filefield',
),
);
}
}
return $formatters;
}