function colorbox_field_formatter_info in Colorbox 6
Same name and namespace in other branches
- 7.2 colorbox.module \colorbox_field_formatter_info()
- 7 colorbox.module \colorbox_field_formatter_info()
Implementation of hook_field_formatter_info().
Adds certain colorbox+imagecache formatters to CCK image fields if imagefield.module and imagecache.module exist.
1 call to colorbox_field_formatter_info()
- colorbox_insert_styles in ./
colorbox.module - Implementation of hook_insert_styles().
File
- ./
colorbox.module, line 419 - A light-weight, customizable lightbox plugin for jQuery 1.3
Code
function colorbox_field_formatter_info() {
$formatters = array();
if (module_exists('imagefield') && module_exists('imagecache')) {
foreach (imagecache_presets() as $preset) {
$formatters[$preset['presetname'] . '__colorbox'] = array(
'label' => t('Colorbox: @preset image', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'image',
'filefield',
),
);
}
}
return $formatters;
}