You are here

function jquery_update_jquery_migrate_backup in jQuery Update 7.3

Add the local fallback in case the jQuery Migrate Plugin 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 $migrate_version: The jQuery Migrate version to be used.

1 call to jquery_update_jquery_migrate_backup()
jquery_update_jquery_migrate_replace in ./jquery_update.module
Enable and configure the jQuery Migrate Plugin

File

./jquery_update.module, line 451
Updates Drupal to use the latest version of jQuery.

Code

function jquery_update_jquery_migrate_backup(&$javascript, $path, $min, $migrate_version) {
  $javascript['jquery.migrate']['js'][] = array(
    'data' => 'window.jQuery && window.jQuery.migrateWarnings || document.write("<script src=\'' . base_path() . $path . '/replace/jquery-migrate/' . $migrate_version . '/jquery-migrate' . $min . '.js\'>\\x3C/script>")',
    'type' => 'inline',
    'group' => JS_LIBRARY,
    'weight' => -19.7999999999,
  );
}