How to allow pre tag in WordPress comments?

How to allow pre tag in WordPress comments?

asked May 5, 2014 by Eric Z Ma (44,280 points)

1 Answer

 
Best answer

You can add a filter hook for pre_comment_approved:

<?php
function filter_handler( $approved , $commentdata )
{
  // inspect $commentdata to determine approval, disapproval, or spam status
  return $approved;
}

add_filter( 'pre_comment_approved' , 'filter_handler' , '99', 2 );
?>

Reference: https://codex.wordpress.org/Plugin_API/Filter_Reference/pre_comment_approved

answered May 5, 2014 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...