Created
June 22, 2023 08:18
-
-
Save pickplugins/dc10fc4b4e6e3b8180becacd64d6b202 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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