You are here

function imagecache_features_export_render in Features 6

Implementation of hook_features_export_render().

File

includes/features.imagecache.inc, line 48

Code

function imagecache_features_export_render($module_name, $data) {
  $items = array();
  foreach ($data as $key) {

    // This second argument to clear the static cache relies on patch in
    // http://drupal.org/node/665284.
    $preset = imagecache_preset_by_name($key, TRUE);
    _imagecache_features_preset_sanitize($preset);
    $items[$key] = $preset;
  }
  $code = "  \$items = " . features_var_export($items, '  ') . ";\n";
  $code .= '  return $items;';
  return array(
    'imagecache_default_presets' => $code,
  );
}