You are here

function image_features_export in Features 7.2

Same name and namespace in other branches
  1. 7 includes/features.image.inc \image_features_export()

Implements hook_features_export().

File

includes/features.image.inc, line 38
Features integration for 'image' module.

Code

function image_features_export($data, &$export, $module_name = '') {
  $pipe = array();
  $map = features_get_default_map('image');
  foreach ($data as $style) {
    $export['dependencies']['image'] = 'image';

    // If another module provides this style, add it as a dependency.
    if (isset($map[$style]) && $map[$style] != $module_name) {
      $module = $map[$style];
      $export['dependencies'][$module] = $module;
    }
    elseif (image_style_load($style)) {
      $export['features']['image'][$style] = $style;
    }
  }
  return $pipe;
}