You are here

function flexslider_picture_flexslider_default_presets_alter in Picture 7

Same name and namespace in other branches
  1. 7.2 flexslider_picture/flexslider_picture.module \flexslider_picture_flexslider_default_presets_alter()

Implements hook_flexslider_default_presets_alter().

Mashed up the default presets of flexslider and picture.

File

flexslider_picture/flexslider_picture.module, line 193
Picture formatter with flexslider support.

Code

function flexslider_picture_flexslider_default_presets_alter(&$defaults) {
  foreach ($defaults as $name => &$settings) {
    $default_preset = ctools_get_default_object('flexslider_picture_optionset', $name);
    if (!empty($default_preset)) {
      $settings->imagestyle_type = $default_preset->imagestyle_type;
      $settings->mapping = $default_preset->mapping;
    }
  }
}