infinum / eightshift-frontend-libs

Frontend library that exposes custom scripts and styles for modern WordPress projects
https://eightshift.com
MIT License
71 stars 12 forks source link

Social-links #216

Closed marijang closed 3 years ago

marijang commented 3 years ago

When i include social links there is no svg icons because wp_kses_post how i can enable svg?

iruzevic commented 3 years ago

This is because all of the "unsafe" content is striped using wp_kses_post method.

You can run this command:

wp boilerplate create_escaped_view

and provide the filter to allow specific setpoints that can be find here: https://github.com/infinum/eightshift-libs/blob/release/3.0.0/src/View/AbstractEscapedView.php

the filter to use is: https://developer.wordpress.org/reference/functions/wp_kses_allowed_html/

tldr. just provide the filter and merge sets in an array for a callback

marijang commented 3 years ago

Danke:D