Filter: bricks/get_remote_templates_data
Filters the data retrieved from a remote template source (e.g., the Bricks Community Templates or a custom remote library). This allows you to modify, add, or remove templates before they are displayed in the template manager.
Parameters
Section titled “Parameters”$remote_templates(array): The decoded JSON response from the remote source, containing template data.
Example usage
Section titled “Example usage”add_filter( 'bricks/get_remote_templates_data', function( $remote_templates ) { // Example: Remove templates with a specific tag if ( ! empty( $remote_templates['templates'] ) ) { foreach ( $remote_templates['templates'] as $key => $template ) { if ( isset( $template['tags'] ) && in_array( 'deprecated', $template['tags'] ) ) { unset( $remote_templates['templates'][ $key ] ); } } }
return $remote_templates;} );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Please do not include passwords, license keys, or personal data. We store submitted notes to improve the docs.
Thanks for sharing feedback. We're using it to improve these docs.