You are here

function cloud_zoom_get_jquery_cycle_version in Cloud Zoom 6

Return the version of JQuery Cycle that is installed

1 call to cloud_zoom_get_jquery_cycle_version()
cloud_zoom_requirements in ./cloud_zoom.install
Implementation of hook_requirements().

File

./cloud_zoom.common.inc, line 39
cloud_zoom.common.inc This file contains functions common to the module and install file

Code

function cloud_zoom_get_jquery_cycle_version($filepath) {
  $version = 0;
  $pattern = '#// Cloud Zoom V([0-9\\.]+)#';
  $js_contents = file_get_contents($filepath);
  if (preg_match($pattern, $js_contents, $matches)) {
    $version = $matches[1];
  }
  return $version;
}