apply_filters( 'clarkson_twig_functions', $functions ) → {Array.<string>}
Adds custom functions to be available in a twig context.
Parameters:
Name | Type | Description |
---|---|---|
$functions |
Array.<string> | Functions to be made available in twig. |
- Since:
- 0.1.0
- Source:
- See:
Returns:
Functions available in twig.
- Type
- Array.<string>
Example
// Make function from pagenavi plugin to available in twig.
add_filter( 'clarkson_twig_functions', function( $functions ) {
$functions[] = 'wp_pagenavi';
return $functions;
} );