function imagefield_extended_theme in ImageField Extended 6.3
Same name and namespace in other branches
- 6.4 imagefield_extended.module \imagefield_extended_theme()
Implementation of hook_theme().
File
- ./
imagefield_extended.module, line 40 - Insert additional fields into an ImageField data array.
Code
function imagefield_extended_theme($existing, $type, $theme, $path) {
$themes = array(
'imagefield_extended_widget' => array(
'arguments' => array(
'element' => NULL,
),
),
'imagefield_extended_formatter_ife' => array(
'arguments' => array(
'element' => NULL,
),
),
'imagefield_extended_image' => array(
'arguments' => array(
'item' => NULL,
'fapi_fields' => array(),
),
'template' => 'imagefield-extended-image',
),
);
// Add imagecache support.
if (module_exists('imagecache')) {
$rules = array();
if (function_exists('imagecache_presets')) {
foreach (imagecache_presets() as $preset_id => $preset_info) {
$rules[$preset_id] = $preset_info['presetname'];
}
}
else {
$rules = _imagecache_get_presets();
}
foreach ($rules as $preset_id => $preset) {
$themes['imagefield_extended_formatter_' . $preset . '_ife'] = array(
'arguments' => array(
'element' => NULL,
),
'function' => 'theme_imagefield_extended_formatter_ife',
);
}
}
return $themes;
}