wp-shortcake / shortcake-bakery

A fine selection of shortcodes for WordPress
42 stars 16 forks source link

allow bypassing whitelist for iframe and script shortcodes #175

Open montchr opened 8 years ago

montchr commented 8 years ago

Users of the plugin should be given the option to bypass the domain whitelists for the Iframe and Script shortcodes.

danielbachhuber commented 8 years ago

Why?

montchr commented 8 years ago

Oftentimes our reporters would like to embed videos from various local news stations etc., which oftentimes use unpredictable domains for video streaming. In a breaking news situation, a video embed being blocked by the whitelist check gets pretty frustrating. Rather than having the editorial group request a domain added to the whitelist every single time, it would be easier to bypass the whitelist feature entirely.

goldenapples commented 8 years ago

@montchr You might want to look into something like https://github.com/humanmade/protected-embeds for that purpose. We use the Shortcake Bakery "Insert Embed code" UI for reporters to paste embed codes into and Shortcake Bakery's reversal process to replace embed codes with a match where available, but then use the shortcake_bakery_embed_reversal hook here to create a protected embed post if the script entered doesn't match a post element or a whitelisted iframe.