function image_style_add_form_submit

Submit handler for adding a new image style.

File

modules/image/image.admin.inc, line 286

Code

function image_style_add_form_submit($form, &$form_state) {
    $style = array(
        'name' => $form_state['values']['name'],
        'label' => $form_state['values']['label'],
    );
    $style = image_style_save($style);
    drupal_set_message(t('Style %name was created.', array(
        '%name' => $style['label'],
    )));
    $form_state['redirect'] = 'admin/config/media/image-styles/edit/' . $style['name'];
}

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