You are here

function _media_crop_is_effect_changes_dimension in Media crop 7

Checks if an effect changes the image dimensions.

This function does not attempt to manually try it out. Instead it has a database of "safe" effects, which can be expanded by implementing hook_media_crop_safe_effects().

Parameters

array $effect: Effect instance definition.

Return value

bool Changes image dimensions or not.

1 call to _media_crop_is_effect_changes_dimension()
_media_crop_effects_are_compatible in ./media_crop.module
Checks if a list of effects are compatible with the cropping interface.

File

./media_crop.module, line 948
Media crop primary module file.

Code

function _media_crop_is_effect_changes_dimension($effect) {
  $whitelist =& drupal_static(__FUNCTION__);
  if ($whitelist === NULL) {
    $whitelist = module_invoke_all('media_crop_safe_effects');
  }
  return empty($whitelist[$effect['name']]);
}