In reply to Armin.

That was my understanding from reading this post.

I just added this to all my sites as an mu-plugin instead:

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters

Show hidden characters

add_filter( 'preprocess_comment', 'nyt_preprocess_comment' );

function nyt_preprocess_comment($comment) {

if ( strlen( $comment['comment_content'] ) > 5000 ) {

wp_die('Comment is too long.');

}

return $comment;

}

view raw

gistfile1.php

hosted with ❤ by GitHub