function _datex_jquery_add_libraries in Datex 7
Loads requested js libraries.
1 call to _datex_jquery_add_libraries()
- datex_form_alter in ./
datex.module - Implements hook_form_alter().
File
- datex_api/
datex_api.module, line 257
Code
function _datex_jquery_add_libraries($libraries = NULL, $intl = NULL) {
if (!function_exists('libraries_load')) {
return;
}
// Let's assume TRUE means fa.
$intl = $intl === TRUE ? 'fa' : $intl;
// Loading multiple libraries in an arraya.
if (is_array($libraries)) {
unset($libraries['jquery.calendars']);
foreach ($libraries as $library) {
libraries_load($library);
if ($intl) {
libraries_load($library . ".{$intl}");
}
}
}
elseif (is_string($libraries)) {
libraries_load($libraries);
if ($intl) {
libraries_load($libraries . ".{$intl}");
}
}
}