akismet_spam_count_incr

akismet_spam_count_incr

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

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('akismet_spam_count_incr') is found 2 times:

  • /wp-content/plugins/akismet/class.akismet.php line 352
     
    			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' ) );
    				} else if ( 'xml-rpc' === $context ) {
    
  • /wp-content/plugins/akismet/class.akismet.php line 1278
    			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;
    	}
    
    	/**