You are here

function _image_features_style_sanitize in Features 7

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

Remove unnecessary keys for export.

1 call to _image_features_style_sanitize()
image_features_export_render in includes/features.image.inc
Implements hook_features_export_render().

File

includes/features.image.inc, line 89

Code

function _image_features_style_sanitize(&$style, $child = FALSE) {
  $omit = $child ? array(
    'isid',
    'ieid',
    'storage',
  ) : array(
    'isid',
    'ieid',
    'storage',
    'module',
  );
  if (is_array($style)) {
    foreach ($style as $k => $v) {
      if (in_array($k, $omit, TRUE)) {
        unset($style[$k]);
      }
      else {
        if (is_array($v)) {
          _image_features_style_sanitize($style[$k], TRUE);
        }
      }
    }
  }
}