You are here

function csp_extras_library_info_alter in Content-Security-Policy 8

Implements hook_library_info_alter().

File

csp_extras/csp_extras.module, line 11
CSP Extras module hooks.

Code

function csp_extras_library_info_alter(&$libraries, $extension) {

  // Add module ajax.js to core library.
  if ($extension == 'core' && isset($libraries['drupal.ajax'])) {
    $path = '/' . drupal_get_path('module', 'csp_extras') . '/js/ajax.js';
    $libraries['drupal.ajax']['js'][$path] = [
      'version' => '1.13',
    ];
  }
}