You are here

function imagecrop_get_fields_enabled_styles in Image javascript crop 7

Helper function to get all the enabled styles for a given field.

2 calls to imagecrop_get_fields_enabled_styles()
imagecrop_get_enabled_styles_for_crop in includes/imagecrop.admin.inc
Get all the enabled styles for the current crop url.
imagecrop_process_form_element in ./imagecrop.module
Process function for imagecrop-enabled fields.

File

./imagecrop.module, line 493
Provides a javascript toolbox through an imagecache action.

Code

function imagecrop_get_fields_enabled_styles($entity_type, $field_name, $bundle) {
  $instance = field_info_instance($entity_type, $field_name, $bundle);

  // No imagecrop settings are found.
  if (!isset($instance['settings']['imagecrop'])) {
    return array();
  }
  return array_filter($instance['settings']['imagecrop']);
}