You are here

function _image_replace_style_options in Image Replace 7

Same name and namespace in other branches
  1. 8 image_replace.module \_image_replace_style_options()

Return a list of image replace enabled style => label map.

Return value

array A key-value list where keys are style names and values are style labels of image styles having a replace effect configured.

2 calls to _image_replace_style_options()
image_replace_form_field_ui_field_edit_form_alter in ./image_replace.module
Implements hook_form_FORM_ID_alter().
image_replace_form_field_ui_field_edit_form_element_validate in ./image_replace.module
Form element validation callback.

File

./image_replace.module, line 343
Provides an image style effect replacing the whole image with another one.

Code

function _image_replace_style_options() {
  $styles = image_styles();
  $result = array();
  foreach ($styles as $style_name => $style) {
    foreach ($style['effects'] as $effect) {
      if ($effect['name'] == 'image_replace') {
        $result[$style_name] = check_plain($style['label']);
      }
    }
  }
  return $result;
}