You are here

function resp_img_field_formatter_info_alter in Responsive images and styles 8

Same name and namespace in other branches
  1. 7.2 resp_img.module \resp_img_field_formatter_info_alter()

Implements hook_field_formatter_info_alter().

File

./resp_img.module, line 262

Code

function resp_img_field_formatter_info_alter(&$info) {
  foreach ($info as $formatter_key => &$formatter) {
    if ($formatter_key == 'image') {
      if (!isset($formatter['settings']) || !is_array($formatter['settings'])) {
        $formatter['settings'] = array();
      }
      $formatter['settings'] += array(
        'resp_img_responsive' => FALSE,
        'resp_img' => array(),
      );
    }
  }
}