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.1

apply_filters('akismet_spam_count_incr') is found 2 times:

  • /wp-content/plugins/akismet/class.akismet.php line 404
     
    			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 1372
    			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;
    	}