Whitelist iFrame Domains in Pressbooks

add_filter( 'pb_whitelisted_domains', 'pb_add_iframe_srcs');

function pb_add_iframe_srcs ($whitelistedDomains){
	return $whitelistedDomains;

PressBooks has a filter that runs in prior to the kses filter and that was removing iframes that we wanted to remain. This bit of PHP in a plugin adds a single domain to the list. If you needed to add a bunch array_merge would let you do that easily.

Comments on this post

No comments.

Leave a Reply

Trackbacks and Pingbacks on this post

No trackbacks.

TrackBack URL