You are here

function hook_imagecache_default_presets in ImageCache 6.2

Provides default ImageCache presets that can be overridden by site administrators.

Return value

array An array of imagecache preset definitions. Each definition can be generated by exporting a preset from the database. Each preset definition should be keyed on its presetname (for easier interaction with drupal_alter) and have the following attributes: "presetname": the imagecache preset name. Required. "actions": an array of action defintions for this preset. Required.

1 invocation of hook_imagecache_default_presets()
imagecache_presets in ./imagecache.module
Get an array of all presets and their settings.

File

./imagecache.api.php, line 48
Hooks provided by the ImageCache module.

Code

function hook_imagecache_default_presets() {
  $presets = array();
  $presets['thumbnail'] = array(
    'presetname' => 'thumbnail',
    'actions' => array(
      0 => array(
        'weight' => '0',
        'module' => 'imagecache',
        'action' => 'imagecache_scale_and_crop',
        'data' => array(
          'width' => '60',
          'height' => '60',
        ),
      ),
    ),
  );
  return $presets;
}