Filter: bricks/get_templates
Filters the list of templates returned by the Templates::get_templates() method. This allows you to modify the templates array before it is returned to the builder or other parts of the application.
Parameters
Section titled “Parameters”$templates(array): Array of template data.$custom_args(array): The arguments used to query the templates.
Example usage
Section titled “Example usage”add_filter( 'bricks/get_templates', function( $templates, $custom_args ) { // Example: Add a custom property to all templates foreach ( $templates as $key => $template ) { $templates[ $key ]['my_custom_property'] = 'value'; }
return $templates;}, 10, 2 );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Thanks for sharing feedback. We're using it to improve these docs.