function image_effect_save

image_effect_save($effect)

Saves an image effect.

Parameters

$effect: An image effect array.

Return value

An image effect array. In the case of a new effect, 'ieid' will be set.

File

modules/image/image.module, line 1304
Exposes global functionality for creating image styles.

Code

function image_effect_save($effect) {
  if (!empty($effect['ieid'])) {
    drupal_write_record('image_effects', $effect, 'ieid');
  }
  else {
    drupal_write_record('image_effects', $effect);
  }
  $style = image_style_load(NULL, $effect['isid']);
  image_style_flush($style);
  return $effect;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!image!image.module/function/image_effect_save/7.x