You are here

function image_default_style_save in Drupal 7

Saves a default image style to the database.

Parameters

style: An image style array provided by a module.

Return value

An image style array. The returned style array will include the new 'isid' assigned to the style.

1 call to image_default_style_save()
image_style_form_override_submit in modules/image/image.admin.inc
Submit handler for overriding a module-defined style.

File

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

Code

function image_default_style_save($style) {
  $style = image_style_save($style);
  $effects = array();
  foreach ($style['effects'] as $effect) {
    $effect['isid'] = $style['isid'];
    $effect = image_effect_save($effect);
    $effects[$effect['ieid']] = $effect;
  }
  $style['effects'] = $effects;
  return $style;
}