, 'xml:space', 'y', ), 'use' => array( 'class', 'clip-path', 'clip-rule', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'height', 'id', 'mask', 'stroke', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'style', 'transform', 'width', 'x', 'xlink:href', 'y', ), ); foreach ( $whitelist as $tag => $attributes ) { $allowed[ $tag ] = array(); foreach ( $attributes as $attribute ) { $allowed[ $tag ][ $attribute ] = true; } } return wp_kses( $svg, $allowed ); }