Commentaire exiger un longueur minimale de commentaire dans wordpress

<?php
add_filter( 'preprocess_comment', 'minimal_comment_length' );
function minimal_comment_length( $commentdata ) {
     $minimalCommentLength = 20;
      if ( strlen( trim( $commentdata['comment_content'] ) ) &lt; $minimalCommentLength ){
       wp_die( 'All comments must be at least ' . $minimalCommentLength . ' characters long.' );
     }
     return $commentdata;
}
?>
claude61340