Plugin Directory

Changeset 3111969

Timestamp:
07/03/2024 10:24:56 PM (6 weeks ago)
Author:
kbrownkd
Message:

Skip the comment check when the comment matches the disallowed list.

Location:
akismet/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • akismet/trunk/akismet.php

    r3111933 r3111969  
    77Plugin URI: https://akismet.com/
    88Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. Akismet Anti-spam keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.
    9 Version: 5.3.3a8
     9Version: 5.3.3a
    1010Requires at least: 5.8
    1111Requires PHP: 5.6.20
     
    4040}
    4141
    42 define( 'AKISMET_VERSION', '5.3.3a8' );
     42define( 'AKISMET_VERSION', '5.3.3a' );
    4343define( 'AKISMET__MINIMUM_WP_VERSION', '5.8' );
    4444define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  • akismet/trunk/class.akismet-admin.php

    r3111923 r3111969  
    534534
    535535    public static function comment_row_action( $a, $comment ) {
    536         $akismet_result = get_comment_meta( $comment->comment_ID, 'akismet_result', true );
     536        $akismet_result  = get_comment_meta( $comment->comment_ID, 'akismet_result', true );
     537        if ( ! $akismet_result && get_comment_meta( $comment->comment_ID, 'akismet_skipped', true ) ) {
     538            $akismet_result = 'skipped'; // Akismet chose to skip the comment-check request.
     539        }
     540
    537541        $akismet_error  = get_comment_meta( $comment->comment_ID, 'akismet_error', true );
    538         $user_result    = get_comment_meta( $comment->comment_ID, 'akismet_user_result', true);
     542        $user_result    = get_comment_meta( $comment->comment_ID, 'akismet_user_result', true);
    539543        $comment_status = wp_get_comment_status( $comment->comment_ID );
    540544        $desc = null;
     
    679683                        case 'webhook-ham-noaction':
    680684                            $message = esc_html( __( 'Akismet cleared this comment during a recheck. It did not update the comment status because it had already been modified by another user or plugin.', 'akismet' ) );
     685
     686
     687
     688
     689
     690
    681691                            break;
    682692                        default:
  • akismet/trunk/class.akismet.php

    r3111923 r3111969  
    225225        self::$last_comment_result = null;
    226226
     227
     228
     229
     230
     231
     232
     233
     234
     235
     236
     237
     238
     239
     240
     241
    227242        $comment = $commentdata;
    228243
     
    428443
    429444                // normal result: true or false
    430                 if ( self::$last_comment['akismet_result'] == 'true' ) {
     445                if ( self::$last_comment['akismet_result'] == 'true' ) {
    431446                    update_comment_meta( $comment->comment_ID, 'akismet_result', 'true' );
    432447                    self::update_comment_history( $comment->comment_ID, '', 'check-spam' );
     
    438453                        );
    439454                    }
    440                 } elseif ( self::$last_comment['akismet_result'] == 'false' ) {
     455                } elseif ( self::$last_comment['akismet_result'] == 'false' ) {
    441456                    update_comment_meta( $comment->comment_ID, 'akismet_result', 'false' );
    442457                    self::update_comment_history( $comment->comment_ID, '', 'check-ham' );
     
    450465                                self::update_comment_history( $comment->comment_ID, '', 'status-changed-' . $comment->comment_approved );
    451466                            }
    452                         } else if ( function_exists( 'wp_blacklist_check' ) && wp_blacklist_check( $comment->comment_author, $comment->comment_author_email, $comment->comment_author_url, $comment->comment_content, $comment->comment_author_IP, $comment->comment_agent ) ) {
    453                             self::update_comment_history( $comment->comment_ID, '', 'wp-blacklisted' );
    454467                        } else {
    455468                            self::update_comment_history( $comment->comment_ID, '', 'status-changed-' . $comment->comment_approved );
    456469                        }
     470
     471
     472
     473
     474
     475
     476
     477
     478
     479
     480
     481
     482
     483
     484
     485
    457486                    }
    458487                } else {
  • akismet/trunk/readme.txt

    r3111915 r3111969  
    3737* Make setup step clearer for new users.
    3838* Remove the stats section from the configuration page if the site has been revoked from the key.
     39
    3940
    4041= 5.3.2 =
Note: See TracChangeset for help on using the changeset viewer.