You are here

function hook_less_functions in Less CSS Preprocessor 7.3

Same name and namespace in other branches
  1. 8 less.api.php \hook_less_functions()
  2. 7.4 less.api.php \hook_less_functions()

Define LESS functions.

Return value

An associative where keys are LESS functions and values are PHP function names or anonymous functions. Anonymous functions require PHP >= 5.3.

See also

http://leafo.net/lessphp/docs/#custom_functions

1 function implements hook_less_functions()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

less_demo_less_functions in less_demo/less_demo.module
Implements hook_less_functions().
1 invocation of hook_less_functions()
less_get_settings in ./less.module
Returns the compiled list of variables and functions for a module/theme.

File

./less.api.php, line 70
Hooks provided by the LESS module.

Code

function hook_less_functions() {
  return array(
    'less_func_1' => 'php_func_1',
    'less_func_2' => function ($arg) {
      list($type, $delimeter, $value) = $arg;
      return array(
        $type,
        $delimeter,
        $value,
      );
    },
  );
}