function jquery_countdown_get_js in jQuery Countdown 6
Return the JS filename of the jQuery.Countdown plugin library.
Return value
Boolean indicating if the JS is located.
1 call to jquery_countdown_get_js()
- jquery_countdown_add in ./
jquery_countdown.module - Adds a jQuery Countdown JavaScript element to the page.
File
- ./
jquery_countdown.module, line 138 - provides the jquery_countdown theme function and serversync callback
Code
function jquery_countdown_get_js() {
$library_path = jquery_countdown_get_path();
if (file_exists($library_path . '/jquery.countdown.js') && file_exists($library_path . '/jquery.countdown.min.js')) {
// use minified version if Javascript preprocessing is enabled...
if (variable_get('preprocess_js', 0)) {
$jquery_countdown_script = 'jquery.countdown.min.js';
}
else {
$jquery_countdown_script = 'jquery.countdown.js';
}
return $library_path . '/' . $jquery_countdown_script;
}
else {
drupal_set_message(t('You need to download the !jquerycountdownjs and extract the entire contents of the archive into the %path folder of your server.', array(
'!jquerycountdownjs' => l(t('jQuery.Countdown plugin'), 'http://keith-wood.name/countdown.html'),
'%path' => $library_path,
)), 'error', FALSE);
return FALSE;
}
}