function image_effect_save

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.

6 calls to image_effect_save()
ImageDimensionsTestCase::testImageDimensions in modules/image/image.test
Test styled image dimensions cumulatively.
ImageStylesHTTPHeadersTestCase::_imagestyleUpscale in modules/image/image.test
Adding upscale effect to imagestyle.
image_default_style_save in modules/image/image.module
Saves a default image style to the database.
image_effect_form_submit in modules/image/image.admin.inc
Submit handler for updating an image effect.
image_style_form_add_submit in modules/image/image.admin.inc
Submit handler for adding a new image effect to an image style.

... See full list

File

modules/image/image.module, line 1383

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.