I know one can modify the kses filter to add new allowed tags to it, but is there a way to remove some of them? I can't find how. I need to disallow DIV tags.
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
The allowed tags are stored in
$allowedposttags (located in
/wp-includes/kses.php) as an array. For each element it looks something like this:
$allowedposttags = array( 'div' => array( 'align' => true, 'dir' => true, 'lang' => true, 'xml:lang' => true, ) );
You can remove a single element of an array via