You are here

function _soundmanager2_get_version in SoundManager2 6.2

Same name and namespace in other branches
  1. 7.2 soundmanager2.module \_soundmanager2_get_version()

Get the version of the soundmanager2

1 call to _soundmanager2_get_version()
soundmanager2_requirements in ./soundmanager2.install
Implementation of hook_requirements()

File

./soundmanager2.module, line 129

Code

function _soundmanager2_get_version($sm2_script = 'sites/all/libraries/soundmanager2/script/soundmanager2.js') {
  if (file_exists($sm2_script)) {
    $lines = file($sm2_script);
    foreach ($lines as $line) {
      if (preg_match("/V(.*)\$/", $line)) {
        $version_str = check_plain(ereg_replace("^(.*) ", "", $line));
        break;
      }
    }
    unset($lineas);
    unset($linea);
  }
  return $version_str;
}