function _less_lessphp_locate in Less CSS Preprocessor 8
Same name and namespace in other branches
- 7.4 includes/less.libraries.inc \_less_lessphp_locate()
- 7.3 less.libraries.inc \_less_lessphp_locate()
Locates leafo/lessphp in the many possible places it could be.
Parameters
array $library: Libraries definition array.
1 call to _less_lessphp_locate()
- less_libraries_info in includes/
less.libraries.inc - Implements hook_libraries_info().
File
- includes/
less.libraries.inc, line 152 - Contains Libraries API integration.
Code
function _less_lessphp_locate(&$library) {
$locations = array();
// Primary libraries location
$locations[] = libraries_get_path('lessphp');
// Legacy bundled location
$locations[] = drupal_get_path('module', 'less') . '/lessphp';
// Composer location
$locations[] = drupal_get_path('module', 'less') . '/vendor/leafo/lessphp';
/*
* oyejorge/less.php does not have the actual version number in lessc.inc.php,
* so we don't have to worry about mistaken identity.
*/
$version_files = array(
'lessc.inc.php' => 'lessc.inc.php',
);
_less_libraries_determine_location($library, $locations, $version_files);
}