function responsive_image_library_info_alter

Same name in other branches
  1. 9 core/modules/responsive_image/responsive_image.module \responsive_image_library_info_alter()
  2. 8.9.x core/modules/responsive_image/responsive_image.module \responsive_image_library_info_alter()

Implements hook_library_info_alter().

Load responsive_image.js whenever ajax is added.

File

core/modules/responsive_image/responsive_image.module, line 540

Code

function responsive_image_library_info_alter(array &$libraries, $module) {
    if ($module === 'core' && isset($libraries['drupal.ajax'])) {
        $libraries['drupal.ajax']['dependencies'][] = 'responsive_image/ajax';
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.