You appear to be a bot. Output may be restricted
Description
Usage
Akismet::recheck_comment( $id, $recheck_reason );
Parameters
- $id
- ( mixed ) required –
- $recheck_reason
- ( mixed ) optional default: recheck_queue –
Returns
void
Source
File name: akismet/class.akismet.php
Lines:
1 to 37 of 37
public static function recheck_comment( $id, $recheck_reason = 'recheck_queue' ) { add_comment_meta( $id, 'akismet_rechecking', true ); $api_response = self::check_db_comment( $id, $recheck_reason ); if ( is_wp_error( $api_response ) ) { // Invalid comment ID. } else if ( 'true' === $api_response ) { wp_set_comment_status( $id, 'spam' ); update_comment_meta( $id, 'akismet_result', 'true' ); delete_comment_meta( $id, 'akismet_error' ); delete_comment_meta( $id, 'akismet_delayed_moderation_email' ); Akismet::update_comment_history( $id, '', 'recheck-spam' ); } elseif ( 'false' === $api_response ) { update_comment_meta( $id, 'akismet_result', 'false' ); delete_comment_meta( $id, 'akismet_error' ); delete_comment_meta( $id, 'akismet_delayed_moderation_email' ); Akismet::update_comment_history( $id, '', 'recheck-ham' ); } else { // abnormal result: error update_comment_meta( $id, 'akismet_result', 'error' ); Akismet::update_comment_history( $id, '', 'recheck-error', array( 'response' => substr( $api_response, 0, 50 ) ) ); } delete_comment_meta( $id, 'akismet_rechecking' ); return $api_response; }