Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
comment limit
add_filter( 'preprocess_comment', 'nyt_preprocess_comment' );
function nyt_preprocess_comment($comment) {
if ( strlen( $comment['comment_content'] ) > 5000 ) {
wp_die('Bu kadar uzun yorum yazılamaz.');
}
return $comment;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment