You appear to be a bot. Output may be restricted
Description
Usage
Akismet::check_db_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 38 of 38
public static function check_db_comment( $id, $recheck_reason = 'recheck_queue' ) { global $wpdb; if ( ! self::get_api_key() ) { return new WP_Error( 'akismet-not-configured', __( 'Akismet is not configured. Please enter an API key.', 'akismet' ) ); } $c = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_ID = %d", $id ), ARRAY_A ); if ( ! $c ) { return new WP_Error( 'invalid-comment-id', __( 'Comment not found.', 'akismet' ) ); } $c['user_ip'] = $c['comment_author_IP']; $c['user_agent'] = $c['comment_agent']; $c['referrer'] = ''; $c['blog'] = get_option( 'home' ); $c['blog_lang'] = get_locale(); $c['blog_charset'] = get_option('blog_charset'); $c['permalink'] = get_permalink($c['comment_post_ID']); $c['recheck_reason'] = $recheck_reason; $c['user_role'] = ''; if ( ! empty( $c['user_ID'] ) ) { $c['user_role'] = Akismet::get_user_roles( $c['user_ID'] ); } if ( self::is_test_mode() ) $c['is_test'] = 'true'; $response = self::http_post( Akismet::build_query( $c ), 'comment-check' ); if ( ! empty( $response[1] ) ) { return $response[1]; } return false; }