function hover_preview_theme in Hover Preview for ImageCache 6
Same name and namespace in other branches
- 7 hover_preview.module \hover_preview_theme()
Implementation of hook_theme().
File
- ./
hover_preview.module, line 11 - Hover Preview for Imagecache.
Code
function hover_preview_theme() {
$presets_a = imagecache_presets();
$presets_b = $presets_a;
$items = array();
$items['hover_preview'] = array(
'arguments' => array(
'node' => NULL,
'field_name' => '',
'preset_a' => '',
'preset_b' => '',
),
);
foreach ($presets_a as $preset_a) {
foreach ($presets_b as $preset_b) {
// Hover only
$id = $preset_a['presetname'] . '_hover_preview_' . $preset_b['presetname'];
$items['hover_preview_formatter_' . $id] = array(
'arguments' => array(
'element' => NULL,
),
'function' => 'theme_hover_preview_formatter',
);
// Linked to node
$id = $preset_a['presetname'] . '_hover_preview_' . $preset_b['presetname'] . '_linked';
$items['hover_preview_formatter_' . $id] = array(
'arguments' => array(
'element' => NULL,
),
'function' => 'theme_hover_preview_formatter',
);
}
}
return $items;
}