function _epsacrop_jcrop_get_version in EPSA Crop - Image Cropping 8.2
Same name and namespace in other branches
- 7.2 epsacrop.module \_epsacrop_jcrop_get_version()
Return the version of jcrop library.
@access public
Return value
void
1 call to _epsacrop_jcrop_get_version()
- epsacrop_requirements in ./
epsacrop.install - Implementation of hook_requirements.
File
- ./
epsacrop.module, line 603 - The main file of module
Code
function _epsacrop_jcrop_get_version() {
$version = 0;
if (file_exists(EPSACROP_JCROP_PATH . '/js/jquery.Jcrop.js')) {
$lines = file(EPSACROP_JCROP_PATH . '/js/jquery.Jcrop.js');
array_shift($lines);
// First line is simple comment
if (preg_match('/v(.*)/', array_shift($lines), $matches)) {
$version = $matches[1];
}
else {
drupal_set_message(t('Could be give the version of Jcrop, check your install'), 'error');
$version = 0;
}
}
return $version;
}