function content_profile_field_formatter_info in Content Profile 6
Implementation of hook_field_formatter_info().
Imagecache formatters are named as $presetname_$style $style is used to determine how the preset should be rendered. If you are implementing custom imagecache formatters please treat _ as reserved.
These presets allow linking the image to the user profile page, rather than the profile node.
File
- ./
content_profile.module, line 605
Code
function content_profile_field_formatter_info() {
$formatters = array();
if (module_exists('imagecache')) {
foreach (imagecache_presets() as $preset) {
$formatters[$preset['presetname'] . '_userlink'] = array(
'label' => t('@preset image linked to user profile', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'image',
'filefield',
),
);
}
}
return $formatters;
}