WordPress.org

Make WordPress Core

Ticket #7051: 7051.diff

File 7051.diff, 1.6 KB (added by solarissmoke, 3 years ago)

Place blacklisted comments in the trash

  • wp-includes/comment.php

     
    636636                else 
    637637                        $approved = 0; 
    638638                if ( wp_blacklist_check($comment_author, $comment_author_email, $comment_author_url, $comment_content, $comment_author_IP, $comment_agent) ) 
    639                         $approved = 'spam'; 
     639                        $approved = 'trash'; 
    640640        } 
    641641 
    642642        $approved = apply_filters( 'pre_comment_approved', $approved, $commentdata ); 
  • wp-admin/options-discussion.php

     
    148148<tr valign="top"> 
    149149<th scope="row"><?php _e('Comment Blacklist') ?></th> 
    150150<td><fieldset><legend class="screen-reader-text"><span><?php _e('Comment Blacklist') ?></span></legend> 
    151 <p><label for="blacklist_keys"><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be marked as spam. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.') ?></label></p> 
     151<p><label for="blacklist_keys"><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be put in the trash. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.') ?></label></p> 
    152152<p> 
    153153<textarea name="blacklist_keys" rows="10" cols="50" id="blacklist_keys" class="large-text code"><?php echo esc_textarea( get_option( 'blacklist_keys' ) ); ?></textarea> 
    154154</p>