1 system.module | system_library_info_alter(&$libraries, $module) |
Implements hook_library_info_alter().
File
- core/
modules/ system/ system.module, line 2149 - Configuration system that lets administrators modify the workings of the site.
Code
function system_library_info_alter(&$libraries, $module) {
// Immediately return if not modifying the system libraries.
if ($module !== 'system') {
return;
}
$config = config('system.core');
// Don't replace anything if default jQuery should be used.
if ($config->get('jquery_version') == 'legacy') {
$libraries['jquery']['version'] = '1.12.4';
$libraries['jquery']['js'] = array(
'core/misc/jquery.1.12.js' => array(
'group' => JS_LIBRARY,
'weight' => -20,
),
// These include security fixes, so assign a weight that makes them load
// as soon after jquery.js is loaded as possible.
'core/misc/jquery-extend-3.4.0.js' => array(
'group' => JS_LIBRARY,
'weight' => -19,
),
'core/misc/jquery-html-prefilter-3.5.0.js' => array(
'group' => JS_LIBRARY,
'weight' => -19,
),
);
}
}