Functions
Anthony Short edited this page Aug 15, 2010
·
2 revisions
This extension has no direct usage, but it used by other extensions.
This is a special extension that allows other extensions to create custom CSS functions. Extensions with the register_function
method can map a function to a CSS function.
This extension will function automatically when enabled.
This extension has no settings.
This is the hook used by other extensions so they can register their functions before any other processing has occurred.
This method is used during the register_function
hook to map a custom function name to a method. Here’s an example from the HSL extension:
<?php
public function register_function($functions)
{
$functions->register('hsl',array($this,'hsl'));
$functions->register('hsla',array($this,'hsla'));
}
When the hsl()
function is encountered in the CSS, it will call the hsl
function in the object in $this
.