function jquery_update_jqueryui_local in jQuery Update 7.3
Same name and namespace in other branches
- 7.2 jquery_update.module \jquery_update_jqueryui_local()
Handle when jQuery UI is updated to the local version.
Parameters
array $javascript: The $libraries array as seen in hook_library_alter()
string $path: The path to the module where replacements can be found.
string $min: The '.min' to include in the file name if we are requesting a minified version.
array $names: An array mapping jquery ui parts to their file names.
1 call to jquery_update_jqueryui_local()
- jquery_update_jqueryui_replace in ./
jquery_update.module - Update jQuery UI to the CDN or local path.
File
- ./
jquery_update.module, line 658 - Updates Drupal to use the latest version of jQuery.
Code
function jquery_update_jqueryui_local(&$javascript, $path, $min, $names) {
// Construct the jQuery UI path and replace the JavaScript.
$jspath = $path . '/replace/ui/ui/' . ($min == '.min' ? 'minified/' : '');
foreach ($names as $name => $file) {
list($file_core, $file_updated) = is_array($file) ? $file : array(
$file,
$file,
);
$corefile = 'misc/ui/jquery.' . $file_core . '.min.js';
$javascript[$name]['js'][$corefile]['data'] = $jspath . 'jquery.' . $file_updated . $min . '.js';
$javascript[$name]['version'] = '1.10.2';
}
}