Filter: clarkson_twig_template_dirs

apply_filters( 'clarkson_twig_template_dirs', $template_dirs ) → {array}

Add/modify directories that contain twig templates that Clarkson should look for.
Parameters:
Name Type Description
$template_dirs array Available variables for the twig template.
Since:
  • 0.1.8
Source:
Returns:
Template directories to look through.
Type
array
Example
// We can add a specific new directory to load templates from to twig.
add_filter( 'clarkson_twig_template_dirs', function( $template_dirs ) {
 $template_dirs[] = realpath( get_stylesheet_directory() ) . '/admin_templates';
 return $template_dirs;
} );