Filter: bricks/svg/allowed_attributes
Filters the list of allowed SVG attributes during sanitization. This is used by the Bricks SVG sanitizer to ensure that uploaded or rendered SVGs do not contain malicious attributes.
Parameters
Section titled “Parameters”$attributes(array): Array of allowed SVG attributes.
Example usage
Section titled “Example usage”add_filter( 'bricks/svg/allowed_attributes', function( $attributes ) { // Example: Allow 'data-custom' attribute $attributes[] = 'data-custom';
return $attributes;} );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.