Set minium comment length

Get rid of poor comments like “cool post!” by setting a mimium character count.

/**
 * Snippet Name: Set minium comment length
 * Snippet URL: https://www.wpcustoms.net/snippets/set-minium-comment-length/
 */
  
function wpc_minimal_comment_length( $commentdata ) {
	$minimalCommentLength = 20;
	if ( strlen( trim( $commentdata['comment_content'] ) ) 

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x