function lightbox2_field_formatter_info in Lightbox2 5
Same name and namespace in other branches
- 8 lightbox2.module \lightbox2_field_formatter_info()
- 5.2 lightbox2.module \lightbox2_field_formatter_info()
- 6 lightbox2.module \lightbox2_field_formatter_info()
- 7.2 lightbox2.module \lightbox2_field_formatter_info()
- 7 lightbox2.module \lightbox2_field_formatter_info()
Implementation of hook_field_formatter_info(). Adds certain lightbox+imagecache formatters to CCK image fields if the imagefield.module and the imagecache.module exist.
File
- ./
lightbox2.module, line 273
Code
function lightbox2_field_formatter_info() {
$formatter = array();
if (module_exists('imagefield') && module_exists('imagecache')) {
$rules = _imagecache_get_presets();
foreach ($rules as $ruleid => $rulename) {
$formatters['lightbox2][' . $rulename] = array(
'label' => 'Lightbox2: ' . $rulename,
'field types' => array(
'image',
),
);
}
}
return $formatters;
}