apply_filters( 'clarkson_twig_args', $twig_args ) → {array}
Allows manipulation of the twig envirionment settings.
Parameters:
Name | Type | Description |
---|---|---|
$twig_args |
array | Default options to use when instantiating a twig environment. |
- Since:
- 0.1.0
- Source:
- See:
Returns:
Options to pass to the twig environment
- Type
- array
Example
// Enable caching in the twig environment.
add_filter( 'clarkson_twig_args', function( $twig_args ) {
$twig_args['cache'] = get_stylesheet_directory() . '/dist/template_cache/';
return $twig_args;
} );