Filter: bricks/template_preview/supported_content_types
Filters the list of content types available for selection in the “Populate Content” (Template Preview) setting. This allows you to add custom preview contexts.
Parameters
Section titled “Parameters”$types(array): Associative array where keys are the content type IDs and values are their labels.
Example usage
Section titled “Example usage”add_filter( 'bricks/template_preview/supported_content_types', function( $types ) { // Example: Add a custom preview type $types['my_custom_preview'] = esc_html__( 'My Custom Preview', 'my-plugin' );
return $types;} );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.