Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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;

This comment has been minimized.

Copy link

@wpexplorer wpexplorer commented Apr 27, 2015

Good idea! But 5000 is a long a*s comment ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment