function jqmulti_jquery_version_from_path in jQuery Multi 6
Same name and namespace in other branches
- 7 jqmulti.module \jqmulti_jquery_version_from_path()
 
Gets the jQuery version from the properly formatted filename.
Parameters
$path the full path to the jQuery library file:
1 call to jqmulti_jquery_version_from_path()
- jqmulti_get_version in ./
jqmulti.module  - Gets the version of jQuery to load.
 
File
- ./
jqmulti.module, line 256  - Code for the jQuery Multi module.
 
Code
function jqmulti_jquery_version_from_path($path) {
  $parts = explode('/', $path);
  $filename = array_pop($parts);
  $matches = array();
  preg_match('/jquery-(.*)\\.min\\.js/', $filename, $matches);
  if (count($matches) == 2) {
    return $matches[1];
  }
  else {
    return FALSE;
  }
}