function manualcrop_form_image_effect_form_alter in Manual Crop 7
Implements hook_form_FORM_ID_alter().
File
- ./
manualcrop.admin.inc, line 405 - Admin functionality for the Manual Crop module.
Code
function manualcrop_form_image_effect_form_alter(&$form, &$form_state) {
$style = $form_state['image_style'];
$effect = $form_state['image_effect'];
if (_manualcrop_is_own_effect($effect)) {
// Effect specific submit handler.
if (function_exists($effect['form callback'] . '_submit')) {
array_unshift($form['#submit'], $effect['form callback'] . '_submit');
}
// Add the effect info on submit.
array_unshift($form['#submit'], 'manualcrop_add_effect_info');
}
elseif (!empty($style['effects']) && variable_get('manualcrop_force_effect_order', TRUE)) {
// Force the effect order for none-Manual Crop effects.
$form['#submit'][] = 'manualcrop_force_effect_order';
}
}