csp_extras.module in Content-Security-Policy 8
CSP Extras module hooks.
File
csp_extras/csp_extras.moduleView source
<?php
/**
* @file
* CSP Extras module hooks.
*/
/**
* Implements hook_library_info_alter().
*/
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',
];
}
}
Functions
Name | Description |
---|---|
csp_extras_library_info_alter | Implements hook_library_info_alter(). |