The allowable HTML tags are in an array called bb_allowed_tags
. I think you could create a plugin that just empties that array.
https://bbpress.org/forums/topic/hooks-038-filters-docu#post-6740
I’ve only seen people requesting the opposite, allowing additional HTML markup, so I’m not sure exactly how to do this.
Thanks for your help. I tried but I couldnt do it. Any other ideas?
The function you’re looking for is bb_allowed_tags in functions.bb-formatting.php, and the allowed tags are stored in an array called $tags.
Create your own plugin file in /my-plugins/, activate it, and apply code to remove (unset) the desired HTML tags from the array. Or just empty the array completely (although I haven’t tested this). Below is an example where I removed anchor/hyperlink functionality in posts:
function remove_a_in_allowed_tags( $tags ) {
unset($tags);
return $tags;
}
add_filter( 'bb_allowed_tags', 'remove_a_in_allowed_tags' );
You can quickly test this by inspecting the $tags array with the following code:
// test allowed tags
$tags = bb_allowed_tags();
print_r($tags);