function _taxonomy_image_presets in Taxonomy Image 6
Same name and namespace in other branches
- 5 taxonomy_image.module \_taxonomy_image_presets()
Helper function for Imagecache presets.
5 calls to _taxonomy_image_presets()
- taxonomy_image_admin_form in ./
taxonomy_image.admin.inc - taxonomy_image_block in contributed/
taxonomy_image_blocks/ taxonomy_image_blocks.module - Implementation of hook_block(). This creates and populates the "unanswered questions" block.
- taxonomy_image_image_attach_form in contributed/
taxonomy_image_attach/ taxonomy_image_attach.module - taxonomy_image_link_alter_form in contributed/
taxonomy_image_link_alter/ taxonomy_image_link_alter.module - taxonomy_image_node_display_form in contributed/
taxonomy_image_node_display/ taxonomy_image_node_display.module
File
- ./
taxonomy_image.module, line 439 - taxonomy_image.module Simple module for providing an association between taxonomy terms and images. Written by Jeremy Andrews <jeremy@kerneltrap.org>, May 2004.
Code
function _taxonomy_image_presets() {
if (module_exists('imagecache')) {
if (function_exists('_imagecache_get_presets')) {
$presets = _imagecache_get_presets();
}
elseif (function_exists('imagecache_presets')) {
$ic_presets = imagecache_presets();
$presets = array();
foreach ($ic_presets as $preset_id => $preset_info) {
$presets[$preset_info['presetid']] = $preset_info['presetname'];
}
}
else {
drupal_set_message(t('Unrecognized Imagecache API.'), 'error');
return FALSE;
}
$presets[0] = 'ORIGINAL';
sort($presets);
return $presets;
}
else {
return FALSE;
}
}