You are here

function shadowbox_get_imagecache_presets in Shadowbox 6.2

Same name and namespace in other branches
  1. 6.4 shadowbox.module \shadowbox_get_imagecache_presets()
  2. 6.3 shadowbox.module \shadowbox_get_imagecache_presets()
3 calls to shadowbox_get_imagecache_presets()
shadowbox_field_formatter_info in ./shadowbox.module
Implementation of hook_field_formatter_info().
shadowbox_theme in ./shadowbox.module
Implementation of hook_theme().
theme_shadowbox_formatter_imagefield in ./shadowbox.module
Implementation of theme_shadowbox_formatter_imagefield().

File

./shadowbox.module, line 942
Shadowbox, a JavaScript media viewer application for displaying content in a modal dialogue.

Code

function shadowbox_get_imagecache_presets($formatted = FALSE) {
  $presets = array();
  if (function_exists('imagecache_presets')) {
    if ($formatted) {
      foreach (imagecache_presets() as $id => $info) {
        $presets[$id] = $info['presetname'];
      }
    }
    else {
      $presets = imagecache_presets();
    }
  }
  else {
    if ($formatted) {
      foreach (_imagecache_get_presets() as $id => $info) {
        $presets[$id] = $info['presetname'];
      }
    }
    else {
      $presets = _imagecache_get_presets();
    }
  }
  return $presets;
}