Hi. This plugin doesn’t support setting a maximum comment length, but that’s a good idea. I’ll look into adding it.
Thread Starter
ink9
(@ink9)
Thank You for considering this…
I think it makes more sense to be able to limit comment character length.
Thread Starter
ink9
(@ink9)
I found this code to limit the character length, it works , but I dont know how to add the modal box, that appear automatically when comment is more that 300 characters. I mean the modal box effect your short comment filter have.
add_filter( 'preprocess_comment', 'maximum_comment_length' );
function maximum_comment_length( $commentdata ) {
$maximumCommentLength = 300;
if ( strlen( trim( $commentdata['comment_content'] ) ) > $maximumCommentLength )
{
wp_die( 'Sorry your comment is more than ' . $maximumCommentLength . ' characters long on this Site.' );
}
return $commentdata;
}
Please I do really need help.