Oh, ok, I see. Open the wp-syntax.php file and fine this code starting at line 37
/*if (!CUSTOM_TAGS) {
$allowedposttags['pre'] = array(
'lang' => array(),
'line' => array(),
'escaped' => array(),
'style' => array(),
'width' => array(),
'highlight' => array(),
'src' => array()
);
//Allow plugin use in comments
$allowedtags['pre'] = array(
'lang' => array(),
'line' => array(),
'escaped' => array(),
'highlight' => array()
);
}*/
And change it to:
if (!CUSTOM_TAGS) {
$allowedposttags['pre'] = array(
'lang' => array(),
'line' => array(),
'escaped' => array(),
'style' => array(),
'width' => array(),
'highlight' => array(),
'src' => array()
);
//Allow plugin use in comments
$allowedtags['pre'] = array(
'lang' => array(),
'line' => array(),
'escaped' => array(),
'highlight' => array()
);
}
The only change is uncommenting it. I didn’t test, but I think this should revert the change that made your hack work.
You might want to accomplish this a different way though. This blog post explains how to tap into a different filter to change the tags and attributes that are permitted rather than doing this string replace you’re doing.
https://www.kavdesign.net/blog/coding/how-to-allow-more-html-tags-in-the-wordpress-comments/