Attributes Filter doesn’t work
-
To allow some attributes I addes this code to my functions.php
—————-
add_filter( ‘svg_allowed_attributes’, function ( $attributes ) {// Do what you want here…
// This should return an array so add your attributes to
// to the $attributes array before returning it. E.G.$attributes[] = ‘vector-effect’;
return $attributes;
} );
—————-I added the vector-effect attribute to a svg-File but after the upload the attribute is removed from the svg-file. Where do i make a mistake? Thanks!
The topic ‘Attributes Filter doesn’t work’ is closed to new replies.