akismet_spam_count_incr

akismet_spam_count_incr

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('akismet_spam_count_incr') is found 2 times:

  • /wp-content/plugins/akismet/class.akismet.php line 404
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    if ( $discard ) {
        // The spam is obvious, so we're bailing out early.
        // akismet_result_spam() won't be called so bump the counter here
        if ( $incr = apply_filters( 'akismet_spam_count_incr', 1 ) ) {
            update_option( 'akismet_spam_count', get_option( 'akismet_spam_count' ) + $incr );
        }
     
        if ( 'rest_api' === $context ) {
            return new WP_Error( 'akismet_rest_comment_discarded', __( 'Comment discarded.', 'akismet' ) );
        } elseif ( 'xml-rpc' === $context ) {
  • /wp-content/plugins/akismet/class.akismet.php line 1376
    1372
    1373
    1374
    1375
    1376
    1377
    1378
    1379
    1380
    1381
            return $approved;
        }
     
        // bump the counter here instead of when the filter is added to reduce the possibility of overcounting
        if ( $incr = apply_filters( 'akismet_spam_count_incr', 1 ) ) {
            update_option( 'akismet_spam_count', get_option( 'akismet_spam_count' ) + $incr );
        }
     
        return self::$last_comment_result;
    }