function hook_less_functions in Less CSS Preprocessor 7.4
Same name and namespace in other branches
- 8 less.api.php \hook_less_functions()
- 7.3 less.api.php \hook_less_functions()
@link http://leafo.net/lessphp/docs/#custom_functions
Return value
array An associative where keys are LESS functions and values are PHP function names or anonymous functions. Anonymous functions require PHP >= 5.3.
Deprecated
Define LESS functions.
See also
hook_less_functions_SYSTEM_NAME_alter()
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.less.inc - 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 121 - 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, $delimiter, $value) = $arg;
return array(
$type,
$delimiter,
$value,
);
},
);
}