You appear to be a bot. Output may be restricted
Description
Usage
Akismet::auto_check_update_meta( $id, $comment );
Parameters
- $id
- ( mixed ) required –
- $comment
- ( mixed ) required –
Returns
void
Source
File name: akismet/class.akismet.php
Lines:
1 to 58 of 58
public static function auto_check_update_meta( $id, $comment ) { // wp_insert_comment() might be called in other contexts, so make sure this is the same comment // as was checked by auto_check_comment if ( is_object( $comment ) && !empty( self::$last_comment ) && is_array( self::$last_comment ) ) { if ( self::matches_last_comment( $comment ) ) { load_plugin_textdomain( 'akismet' ); // normal result: true or false if ( self::$last_comment['akismet_result'] == 'true' ) { update_comment_meta( $comment->comment_ID, 'akismet_result', 'true' ); self::update_comment_history( $comment->comment_ID, '', 'check-spam' ); if ( $comment->comment_approved != 'spam' ) { self::update_comment_history( $comment->comment_ID, '', 'status-changed-' . $comment->comment_approved ); } } elseif ( self::$last_comment['akismet_result'] == 'false' ) { update_comment_meta( $comment->comment_ID, 'akismet_result', 'false' ); self::update_comment_history( $comment->comment_ID, '', 'check-ham' ); // Status could be spam or trash, depending on the WP version and whether this change applies: // https://core.trac.wordpress.org/changeset/34726 if ( $comment->comment_approved == 'spam' || $comment->comment_approved == 'trash' ) { if ( function_exists( 'wp_check_comment_disallowed_list' ) ) { if ( wp_check_comment_disallowed_list( $comment->comment_author, $comment->comment_author_email, $comment->comment_author_url, $comment->comment_content, $comment->comment_author_IP, $comment->comment_agent ) ) { self::update_comment_history( $comment->comment_ID, '', 'wp-disallowed' ); } else { self::update_comment_history( $comment->comment_ID, '', 'status-changed-' . $comment->comment_approved ); } } 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 ) ) { self::update_comment_history( $comment->comment_ID, '', 'wp-blacklisted' ); } else { self::update_comment_history( $comment->comment_ID, '', 'status-changed-' . $comment->comment_approved ); } } } else { // abnormal result: error update_comment_meta( $comment->comment_ID, 'akismet_error', time() ); self::update_comment_history( $comment->comment_ID, '', 'check-error', array( 'response' => substr( self::$last_comment['akismet_result'], 0, 50 ) ) ); } // record the complete original data as submitted for checking if ( isset( self::$last_comment['comment_as_submitted'] ) ) { update_comment_meta( $comment->comment_ID, 'akismet_as_submitted', self::$last_comment['comment_as_submitted'] ); } if ( isset( self::$last_comment['akismet_pro_tip'] ) ) { update_comment_meta( $comment->comment_ID, 'akismet_pro_tip', self::$last_comment['akismet_pro_tip'] ); } } } }