WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code | 
|---|---|
| 327 |      $comment['blog']       = get_option('home'); | 
| 328 |      $comment['blog_lang']  = get_locale(); | 
| 329 |      $comment['blog_charset'] = get_option('blog_charset'); | 
| 330 |      $comment['permalink']  = get_permalink($comment['comment_post_ID']); | 
| 331 |       | 
| 332 |      if ( !empty( $comment['user_ID'] ) ) { | 
| 333 |           $comment['user_role'] = akismet_get_user_roles( $comment['user_ID'] ); | 
| 334 |      } | 
| 335 |  | 
| 336 |      $akismet_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) ); | 
| 337 |      $comment['akismet_comment_nonce'] = 'inactive'; | 
| 338 |      if ( $akismet_nonce_option == 'true' || $akismet_nonce_option == '' ) { | 
| 339 |           $comment['akismet_comment_nonce'] = 'failed'; | 
| 340 |           if ( isset( $_POST['akismet_comment_nonce'] ) && wp_verify_nonce( $_POST['akismet_comment_nonce'], 'akismet_comment_nonce_' . $comment['comment_post_ID'] ) ) | 
| 341 |                $comment['akismet_comment_nonce'] = 'passed'; | 
| 342 |  | 
| 343 |           // comment reply in wp-admin | 
| 344 |           if ( isset( $_POST['_ajax_nonce-replyto-comment'] ) && check_ajax_referer( 'replyto-comment', '_ajax_nonce-replyto-comment' ) ) | 
| 345 |                $comment['akismet_comment_nonce'] = 'passed'; | 
| Line | Code | 
| 577 | } | 
| 578 | add_action( 'akismet_schedule_cron_recheck', 'akismet_cron_recheck' ); | 
| 579 |  | 
| 580 | function akismet_add_comment_nonce( $post_id ) { | 
| 581 |      echo '<p style="display: none;">'; | 
| 582 |      wp_nonce_field( 'akismet_comment_nonce_' . $post_id, 'akismet_comment_nonce', FALSE ); | 
| 583 |      echo '</p>'; | 
| 584 | } | 
| 585 |  | 
| 586 | $akismet_comment_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) ); | 
| 587 |  | 
| 588 | if ( $akismet_comment_nonce_option == 'true' || $akismet_comment_nonce_option == '' ) | 
| 589 |      add_action( 'comment_form', 'akismet_add_comment_nonce' ); | 
| 590 |  | 
| 591 | global $wp_version; | 
| 592 | if ( '3.0.5' == $wp_version ) {  | 
| 593 |      remove_filter( 'comment_text', 'wp_kses_data' );  | 
| 594 |      if ( is_admin() )  | 
| 595 |           add_filter( 'comment_text', 'wp_kses_post' );  |