Viewing 2 replies - 1 through 2 (of 2 total)
  • the allowed html tags are difinde in a global array in /wp-includes/kses.php;
    to remove them, set the array content to nothing;
    by adding some code like this to functions.php of your theme:

    /*
    	 * Kses allowed HTML elements.
    	 * /wp-includes/kses.php
    	 * @global array $allowedtags
    */
    	global $allowedtags;
    	//remove html tags for comments by setting the array to empty
    	$allowedtags = array();
    /*
    */

    to remove the text ‘You may use these HTML tags and attributes: ‘ or so, you might need to edit comments.php of your theme, and find comment_form()
    ( https://codex.www.ads-software.com/Function_Reference/comment_form ) – then change to:
    comment_form(array('comment_notes_after' => ''))

    Thread Starter ModernRevolutions

    (@modernrevolutions)

    Thanks! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to disable HTML in comments’ is closed to new replies.