Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: akismet_comment_check_response

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
367      $comment[ 'comment_post_modified_gmt' ] = $post->post_modified_gmt;
368
369      $query_string = '';
370      foreach ( $comment as $key => $data )
371           $query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&';
372           
373      $commentdata['comment_as_submitted'] = $comment;
374
375      $response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port);
376      do_action( 'akismet_comment_check_response', $response );
377      akismet_update_alert( $response );
378      $commentdata['akismet_result'] = $response[1];
379      if ( 'true' == $response[1] ) {
380           // akismet_spam_count will be incremented later by akismet_result_spam()
381           add_filter('pre_comment_approved', 'akismet_result_spam');
382
383           do_action( 'akismet_spam_caught' );
384
385           $last_updated = strtotime( $post->post_modified_gmt );