You are here

function template_preprocess_designkit in DesignKit 6

Same name and namespace in other branches
  1. 7 designkit.module \template_preprocess_designkit()

Preprocessor for theme('designkit').

File

./designkit.module, line 221

Code

function template_preprocess_designkit(&$vars) {

  // Map each color to a corresponding variable name.
  foreach ($vars['color'] as $key => $color) {
    $vars[$key] = $color;
  }

  // Map each image to a corresponding variable name.
  // Provide a _raw version for non-imagecache processed URLs.
  foreach ($vars['image'] as $key => $filepath) {
    $vars[$key] = imagecache_create_url("designkit-image-{$key}", $filepath);
    $vars["{$key}_raw"] = file_create_url($filepath);
  }
}