jcadima
7/19/2017 - 1:51 PM

Disable HTML tags in Comments

Disable HTML tags in Comments

<?php

/** ******** ******** ******** ******** ******** ******** ******** ******** 
* TITLE:       Disable HTML in WordPress comments
* DESCRIPTION: Disallow HTML in WordPress comments, add this snippet to your functions.php file.
*/

add_filter( 'pre_comment_content', 'wp_specialchars' );