View source
<?php
function jssor_requirements($phase) {
if ($phase == 'runtime') {
$requirements = array();
$info = libraries_info('jssor-slider');
$version = null;
if ($info !== false) {
$lib_path = libraries_get_path('jssor-slider', TRUE);
if (!empty($lib_path)) {
$info['library path'] = $lib_path;
$version = libraries_get_version($info, $info['version arguments']);
}
}
$requirements['jssor'] = array(
'title' => 'JSSOR Library',
'severity' => $version ? REQUIREMENT_OK : REQUIREMENT_ERROR,
'description' => 'The JSSOR Slider library. Download from http://wwww.jssor.com',
'value' => $version,
);
return $requirements;
}
}