You are here

function jquery_update_jquery_path in jQuery Update 6.2

Same name and namespace in other branches
  1. 6 jquery_update.module \jquery_update_jquery_path()

Return the path to the jQuery file.

2 calls to jquery_update_jquery_path()
jquery_update_get_version in ./jquery_update.module
Return the version of jQuery that is installed.
jquery_update_jquery_update_alter in ./jquery_update.module
Implements hook_jquery_update_alter().

File

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

Code

function jquery_update_jquery_path() {

  // Check whether we are to retrieve the minified version.
  $jquery_file = array(
    'none' => 'jquery.js',
    'min' => 'jquery.min.js',
  );
  $type = variable_get('jquery_update_compression_type', 'min');

  // Find the jQuery version to use.
  $version = variable_get('jquery_update_jquery_version', '1.3');
  $path = drupal_get_path('module', 'jquery_update') . '/replace/jquery/' . $version . '/';
  return $path . $jquery_file[$type];
}