You are here

function template_preprocess_imagecache_insert_image in Insert 6

Theme the content that will be inserted for ImageCache presets.

File

includes/imagecache.inc, line 33
Insert support for ImageCache module.

Code

function template_preprocess_imagecache_insert_image(&$vars) {
  $absolute = isset($vars['widget']['insert_absolute']) ? $vars['widget']['insert_absolute'] : NULL;
  $absolute = (bool) (isset($absolute) ? $absolute : variable_get('insert_absolute_paths', FALSE));
  $vars['url'] = imagecache_create_url($vars['preset_name'], $vars['item']['filepath'], FALSE, $absolute);
  $vars['class'] = !empty($vars['widget']['insert_class']) ? $vars['widget']['insert_class'] : '';
}