WordPress.org

Make WordPress Core

Ticket #7894: akismet.patch

File akismet.patch, 1.6 KB (added by Viper007Bond, 10 years ago)

Have Akismet submit spam -> approved comments as ham

  • akismet.php

     
    22/*
    33Plugin Name: Akismet
    44Plugin URI: http://akismet.com/
    5 Description: Akismet checks your comments against the Akismet web service to see if they look like spam or not. You need a <a href="http://wordpress.com/api-keys/">WordPress.com API key</a> to use it. You can review the spam it catches under "Comments." To show off your Akismet stats just put <code>&lt;?php akismet_counter(); ?></code> in your template. See also: <a href="http://wordpress.org/extend/plugins/stats/">WP Stats plugin</a>.
    6 Version: 2.1.8
     5Description: Akismet checks your comments against the Akismet web service to see if they look like spam or not. You need a <a href="http://wordpress.com/api-keys/">WordPress.com API key</a> to use it. You can review the spam it catches under "Comments." To show off your Akismet stats just put <code>&lt;?php akismet_counter(); ?&gt;</code> in your template. See also: <a href="http://wordpress.org/extend/plugins/stats/">WP Stats plugin</a>.
     6Version: 2.1.9
    77Author: Matt Mullenweg
    88Author URI: http://ma.tt/
    99*/
     
    263263add_action('edit_comment', 'akismet_submit_spam_comment');
    264264add_action('preprocess_comment', 'akismet_auto_check_comment', 1);
    265265
     266function akismet_spamtoham( $comment ) { akismet_submit_nonspam_comment( $comment->comment_ID ); }
     267add_filter( 'comment_spam_to_approved', 'akismet_spamtoham' );
     268
    266269// Total spam in queue
    267270// get_option( 'akismet_spam_count' ) is the total caught ever
    268271function akismet_spam_count( $type = false ) {