You are here

function iss_image_styles in Image Style Selector 7.2

Get all styles that are ISS enabled.

Parameters

string $filter: Possible values are: "all", "source" and "target"

Return value

array

2 calls to iss_image_styles()
iss_field_widget_form_alter in ./iss.module
Implements hook_field_widget_form_alter().
iss_form_field_ui_field_edit_form_alter in ./iss.admin.inc
Implements hook_form_FORM_ID_alter().

File

./iss.module, line 254

Code

function iss_image_styles($filter = 'all') {
  $styles = image_styles();
  $styles = array_filter($styles, function ($v) {
    return isset($v['iss_enabled']) && $v['iss_enabled'] == 1;
  });
  array_walk($styles, function (&$v, $k) {
    $v = $v['label'];
  });
  drupal_alter('iss_image_styles', $styles, $filter);
  return $styles;
}