@bdthemes Those are valid attributes so we don’t remove those by default. You can extend what attributes are allowed by using the svg_allowed_attributes
filter and changing the array of approved attributes.
I’ve not tested this but you would want to do something like:
function prefix_change_svg_allowed_attributes( $allowed_attributes = array() ) {
$attributes_to_remove = array(
'version',
'encoding',
);
return array_diff( $allowed_attributes, $attributes_to_remove );
}
add_filter( 'svg_allowed_attributes', 'prefix_change_svg_allowed_attributes' );
-
This reply was modified 2 years, 6 months ago by
Darin Kotter.