function jplayer_requirements in jPlayer 6
Same name and namespace in other branches
- 8.2 jplayer.install \jplayer_requirements()
- 7.2 jplayer.install \jplayer_requirements()
Implementation of hook_requirements().
File
- ./
jplayer.install, line 24 - Installation file for jPlayer module.
Code
function jplayer_requirements($phase) {
$requirements = array();
if ($phase == 'runtime') {
$requirements['jplayer']['title'] = t('jPlayer');
if ($jplayer_version = jplayer_get_version()) {
$requirements['jplayer']['value'] = $jplayer_version;
$requirements['jplayer']['severity'] = REQUIREMENT_OK;
}
else {
$requirements['jplayer']['value'] = t('Not found');
$requirements['jplayer']['description'] = t('Missing the jPlayer library. Please <a href="!url">download jPlayer</a> and extract it into the %directory directory.', array(
'!url' => url('http://www.happyworm.com/jquery/jplayer/download.htm'),
'%directory' => variable_get('jplayer_directory', 'sites/all/libraries/jplayer'),
));
$requirements['jplayer']['severity'] = REQUIREMENT_ERROR;
}
}
return $requirements;
}