Embeds stripped from testimonials
-
When a YouTube video link is entered into a post, it shows up on the front end as that video embedded in the content, but not in testimonials. This is due to the use of
wp_kses_post()on the testimonial contents, which doesn’t allowiframeelements.Unfortunately, there’s no way to override the allowed HTML before the call to
wp_kses_post(), so the only way to get around this is with thewp_kses_allowed_htmlfilter, which applies to all posts.Plugin developer(s), please allow video embedding in testimonials, because this creates a richer experience on the site, or at least let site developers choose what to allow via a special filter that only applies to testimonials or a plugin setting.
The allowed HTML also doesn’t contain the
typeattribute of scripts, which causesld+jsonto be stripped from the plugin’s Schema Review markup. Besides fixing this, adding a filter for allowed HTML can help work around this.The page I need help with: [log in to see the link]
The topic ‘Embeds stripped from testimonials’ is closed to new replies.