You are here

function image_features_revert in Features 7.2

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

Implements hook_features_revert().

File

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

Code

function image_features_revert($module) {
  if ($default_styles = features_get_default('image', $module)) {
    foreach ($default_styles as $default_style_name => $default_style) {
      if ($style = image_style_load($default_style_name)) {
        if ($style['storage'] != IMAGE_STORAGE_DEFAULT) {
          image_default_style_revert($style);
        }
        else {

          // Verify that the loaded style still matches what's in code.
          if ($default_style['effects'] !== $style['effects']) {
            image_default_style_revert($style);
          }
        }
      }
    }
  }
}