Skip to content

Instantly share code, notes, and snippets.

@kovshenin
Created April 27, 2015 16:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kovshenin/2393e3da32ac3ba379fa to your computer and use it in GitHub Desktop.
Save kovshenin/2393e3da32ac3ba379fa to your computer and use it in GitHub Desktop.
meanwhile.php
<?php
add_filter( 'pre_comment_content', function( $content ) {
if ( strlen( $content ) > 64000 )
wp_die( 'Invalid comment.' );
return $content;
} );
@jb510
Copy link

jb510 commented Apr 27, 2015

Brilliant!

@safranck
Copy link

Sweet! Thanks for posting this!

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