function jquery_update_jqueryui_backup in jQuery Update 7.2
Same name and namespace in other branches
- 7.3 jquery_update.module \jquery_update_jqueryui_backup()
Add the local fallback in case jQuery UI from the CDN is unavailable.
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.
1 call to jquery_update_jqueryui_backup()
- jquery_update_jqueryui_replace in ./
jquery_update.module - Update jQuery UI to the CDN or local path.
File
- ./
jquery_update.module, line 465 - Updates Drupal to use the latest version of jQuery.
Code
function jquery_update_jqueryui_backup(&$javascript, $path, $min) {
$js_path = $min == '.min' ? '/replace/ui/ui/minified/jquery-ui.min.js' : '/replace/ui/ui/jquery-ui.js';
$javascript['ui']['js'][] = array(
'data' => 'window.jQuery.ui || document.write("<script src=\'' . base_path() . $path . $js_path . '\'>\\x3C/script>")',
'type' => 'inline',
'group' => JS_LIBRARY,
'weight' => -10.999999999,
);
}