You appear to be a bot. Output may be restricted
Description
Usage
Akismet::last_comment_status( $approved, $comment );
Parameters
- $approved
- ( mixed ) required –
- $comment
- ( mixed ) required –
Returns
void
Source
File name: akismet/class.akismet.php
Lines:
1 to 27 of 27
public static function last_comment_status( $approved, $comment ) { if ( is_null( self::$last_comment_result ) ) { // We didn't have reason to store the result of the last check. return $approved; } // Only do this if it's the correct comment if ( ! self::matches_last_comment( $comment ) ) { self::log( "comment_is_spam mismatched comment, returning unaltered $approved" ); return $approved; } if ( 'trash' === $approved ) { // If the last comment we checked has had its approval set to 'trash', // then it failed the comment blacklist check. Let that blacklist override // the spam check, since users have the (valid) expectation that when // they fill out their blacklists, comments that match it will always // end up in the trash. 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; }