You appear to be a bot. Output may be restricted
Description
Usage
Akismet::submit_nonspam_comment( $comment_id );
Parameters
- $comment_id
- ( mixed ) required –
Returns
void
Source
File name: akismet/class.akismet.php
Lines:
1 to 57 of 57
public static function submit_nonspam_comment( $comment_id ) { global $wpdb, $current_user, $current_site; $comment_id = (int) $comment_id; $comment = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_ID = %d", $comment_id ) ); if ( !$comment ) // it was deleted return; self::update_comment_history( $comment_id, '', 'report-ham' ); // If the user hasn't configured Akismet, there's nothing else to do at this point. if ( ! self::get_api_key() ) { return; } // use the original version stored in comment_meta if available $as_submitted = self::sanitize_comment_as_submitted( get_comment_meta( $comment_id, 'akismet_as_submitted', true ) ); if ( $as_submitted && is_array($as_submitted) && isset($as_submitted['comment_content']) ) $comment = (object) array_merge( (array)$comment, $as_submitted ); $comment->blog = get_option( 'home' ); $comment->blog_lang = get_locale(); $comment->blog_charset = get_option('blog_charset'); $comment->permalink = get_permalink( $comment->comment_post_ID ); $comment->user_role = ''; if ( is_object($current_user) ) $comment->reporter = $current_user->user_login; if ( is_object($current_site) ) $comment->site_domain = $current_site->domain; if ( ! empty( $comment->user_ID ) ) { $comment->user_role = Akismet::get_user_roles( $comment->user_ID ); } if ( Akismet::is_test_mode() ) $comment->is_test = 'true'; $post = get_post( $comment->comment_post_ID ); if ( ! is_null( $post ) ) { $comment->comment_post_modified_gmt = $post->post_modified_gmt; } $response = self::http_post( Akismet::build_query( $comment ), 'submit-ham' ); update_comment_meta( $comment_id, 'akismet_user_result', 'false' ); if ( $comment->reporter ) { update_comment_meta( $comment_id, 'akismet_user', $comment->reporter ); } do_action('akismet_submit_nonspam_comment', $comment_id, $response[1]); }