You are here

function _less_inc in Less CSS Preprocessor 6.2

Same name and namespace in other branches
  1. 8 less.module \_less_inc()
  2. 7.4 less.module \_less_inc()
  3. 7.2 less.module \_less_inc()
  4. 7.3 less.module \_less_inc()
2 calls to _less_inc()
less_requirements in ./less.install
Implementation of hook_requirements().
_less_build in ./less.module
Builds the less cache
1 string reference to '_less_inc'
less_requirements in ./less.install
Implementation of hook_requirements().

File

./less.module, line 212
Handles compiling of .less files.

Code

function _less_inc() {
  if (!class_exists('lessc', FALSE)) {
    $include_locations = array(
      'lessphp/lessc.inc.php',
    );

    // load libraries module for during install
    module_load_include('module', 'libraries');
    if (function_exists('libraries_get_path')) {
      array_unshift($include_locations, libraries_get_path('lessphp') . '/lessc.inc.php');
    }
    foreach ($include_locations as $include_location) {
      if (file_exists($include_location)) {
        require_once $include_location;
        break;
      }
    }
  }
  return class_exists('lessc', FALSE);
}