You are here

flexslider_fields.module in Flex Slider 8.2

Adds fields integration with FlexSlider.

File

flexslider_fields/flexslider_fields.module
View source
<?php

/**
 * @file
 * Adds fields integration with FlexSlider.
 */

/**
 * Implements hook_field_formatter_info_alter().
 */
function flexslider_fields_field_formatter_info_alter(array &$info) {

  // Remove responsive formatter if responsive image module is not installed.
  if (!\Drupal::moduleHandler()
    ->moduleExists('responsive_image') && isset($info['flexslider_responsive'])) {
    unset($info['flexslider_responsive']);
  }
}