function _manualcrop_is_own_effect in Manual Crop 7
Checks if the effect is a Manual Crop effect.
Parameters
$effect: Image style effect information array.
$crop_effect: Set to TRUE to require a cropping effect; set to FALSE to require a reuse effect. Defaults to NULL, which ignores effect type.
Return value
TRUE if this is a Manual Crop (cropping/reuse) effect, FALSE otherwise.
13 calls to _manualcrop_is_own_effect()
- manualcrop_add_effect_info in ./
manualcrop.admin.inc - Effect form submit handler; Adds some extra info (style name and weight) to the effect.
- manualcrop_force_effect_order in ./
manualcrop.admin.inc - Effect and style form submit handler; Force the Manual Crop effect to be the first one.
- manualcrop_form_image_effect_delete_form_alter in ./
manualcrop.admin.inc - Implements hook_form_FORM_ID_alter().
- manualcrop_form_image_effect_form_alter in ./
manualcrop.admin.inc - Implements hook_form_FORM_ID_alter().
- manualcrop_form_image_style_form_alter in ./
manualcrop.admin.inc - Implements hook_form_FORM_ID_alter().
File
- ./
manualcrop.helpers.inc, line 806 - Helper functions for the Manual Crop module.
Code
function _manualcrop_is_own_effect($effect, $crop_effect = NULL) {
if ($effect['module'] == 'manualcrop') {
if (is_null($crop_effect)) {
return TRUE;
}
return $crop_effect ^ in_array($effect['name'], array(
'manualcrop_reuse',
'manualcrop_auto_reuse',
));
}
return FALSE;
}