Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pickplugins/dc10fc4b4e6e3b8180becacd64d6b202 to your computer and use it in GitHub Desktop.
Save pickplugins/dc10fc4b4e6e3b8180becacd64d6b202 to your computer and use it in GitHub Desktop.
function custom_wpkses_post_tags( $tags, $context ) {
if ( 'post' === $context ) {
$tags['iframe'] = array(
'src' => true,
'height' => true,
'width' => true,
'frameborder' => true,
'allowfullscreen' => true,
);
$tags['script'] = array(
'id' => true,
'class' => true,
'src' => true,
);
$tags['style'] = array(
'id' => true,
'class' => true,
'src' => true,
);
}
return $tags;
}
add_filter( 'wp_kses_allowed_html', 'custom_wpkses_post_tags', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment