3 ms·
I was surprised there is no plugin to limit the size of a comment, so I ended up editing `wp-comments-post.php` line 129 from: if ( '' == $comment_content ) {
by melomac 11y ago
I was surprised there is no plugin to limit the size of a comment, so I ended up editing `wp-comments-post.php` line 129 from:
if ( '' == $comment_content ) {
to:
if ( '' == $comment_content || 32768 < strlen($comment_content) ) {
- mpalme 11y agoI was surprised that the PHP database access layer doesn't throw an error and aborts the transaction (like the other DAL I know would do).