responsive_image_library_info_alter

responsive_image_library_info_alter(array &$libraries, $module)

Implements hook_library_info_alter().

Load responsive_image.js whenever ajax is added.

File

core/modules/responsive_image/responsive_image.module, line 510
Responsive image display formatter for image fields.

Code

function responsive_image_library_info_alter(array &$libraries, $module) {
  if ($module === 'core' && isset($libraries['drupal.ajax'])) {
    $libraries['drupal.ajax']['dependencies'][] = 'responsive_image/ajax';
  }
}
doc_Drupal
2016-10-29 09:38:12
Comments
Leave a Comment

Please login to continue.