function isotope_library_alter in Isotope (with Masonry and Packery) 7
Implements hook_library_alter().
File
- ./
isotope.module, line 116 - Defines the default hooks that the history js module implements.
Code
function isotope_library_alter(&$libraries, $module) {
module_load_include('module', 'libraries');
$libpath = libraries_get_path('isotope');
$settings = variable_get('isotope_libraries', array());
$useisobbq = !empty($settings['jquery.ba-bbq']);
$useisojq = !empty($settings['jquery-1.7.1']);
if (is_dir($libpath) != TRUE) {
if ($useisobbq && $module == 'system' && isset($libraries['jquery.bbq'])) {
$bbqpath = $libpath . '/js/jquery.ba-bbq.min.js';
$libraries['jquery.bbq']['version'] = '1.2.1-isotope';
$libraries['jquery.bbq']['js'] = array(
$bbqpath => array(),
);
}
if ($useisojq && $module == 'system' && isset($libraries['jquery'])) {
$jqpath = $libpath . '/js/jquery-1.7.1.min.js';
$libraries['jquery']['version'] = '1.7.1-isotope';
$oldsettings = array();
if (isset($libraries['jquery']['js']['misc/jquery.js'])) {
$oldsettings = $libraries['jquery']['js']['misc/jquery.js'];
}
$libraries['jquery']['js'] = array(
$jqpath => $oldsettings,
);
}
}
}