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