Make WordPress Core

Ticket #32981: comment_filter.diff

File comment_filter.diff, 398 bytes (added by sgrant, 9 years ago)

Add a filter before the empty string comment check.

  • wp-comments-post.php

     
    126126        }
    127127}
    128128
     129$comment_content = apply_filters( 'comment_content_check', $comment_content );
     130
    129131if ( '' == $comment_content ) {
    130132        wp_die( __( '<strong>ERROR</strong>: please type a comment.' ), 200 );
    131133}