function _juicebox_library_post_detect in Juicebox HTML5 Responsive Image Galleries 7
Libraries API Post-Detect Callback
Add detailed variables to a Juicebox library array after the version info can be detected.
See also
1 call to _juicebox_library_post_detect()
- _juicebox_library_detect in ./
juicebox.module - Get/detect the details of a Juicebox javascript library without loading it.
1 string reference to '_juicebox_library_post_detect'
- juicebox_libraries_info in ./
juicebox.module - Implements hook_libraries_info().
File
- ./
juicebox.module, line 420 - Provides Drupal integration with the Juicebox library.
Code
function _juicebox_library_post_detect(&$library) {
$pro = FALSE;
$disallowed_conf = array();
if (!empty($library['version'])) {
// Check if this is a Pro version.
if (stripos($library['version'], "Pro") !== FALSE) {
$pro = TRUE;
}
// Get numeric part of the version statement.
$version_number = 0;
$matches = array();
preg_match("/[0-9\\.]+[^\\.]\$/u", $library['version'], $matches);
if (!empty($matches[0])) {
$version_number = $matches[0];
}
// Some options are not available as LITE options before v1.3.
if (!$pro && version_compare($version_number, '1.3', '<')) {
$disallowed_conf = array_merge($disallowed_conf, array(
'jlib_textColor',
'jlib_thumbFrameColor',
'jlib_useFullscreenExpand',
'jlib_useThumbDots',
));
}
}
$library['pro'] = $pro;
$library['disallowed_conf'] = $disallowed_conf;
}