theme_imagecache

Versions
5
theme_imagecache($namespace, $path, $alt = '', $title = '', $attributes = null)
6
theme_imagecache($presetname, $path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE)

Code

contributions/imagecache/imagecache.module, line 658

<?php
function theme_imagecache($namespace, $path, $alt = '', $title = '', $attributes = null) {
  // check is_null so people can intentionally pass an empty array of attributes to override
  // the defaults completely... if 
  if (is_null($attributes)) {
    $attributes['class'] = 'imagecache imagecache-'. $namespace;
  } 
  $attributes = drupal_attributes($attributes);
  $imagecache_url = imagecache_create_url($namespace, $path);
  return '<img src="'. $imagecache_url .'" alt="'. check_plain($alt) .'" title="'. check_plain($title) .'" '. $attributes .' />';
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.