Last active
August 29, 2015 14:20
-
-
Save ethanhinson/29f7e823115729bbd27d to your computer and use it in GitHub Desktop.
Blocks the total comment link for WP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'preprocess_comment', 'bt_preprocess_comment' ); | |
function bt_preprocess_comment($comment) { | |
// the comment_content column should never by greater than 64kb | |
if ( strlen( $comment['comment_content'] ) > 65534 ) { | |
wp_die('Comment is too long.'); | |
} | |
return $comment; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment