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 | 
|---|---|
| 153 |           $comment['blog_lang']    = get_locale(); | 
| 154 |           $comment['blog_charset'] = get_option('blog_charset'); | 
| 155 |           $comment['permalink']    = get_permalink( $comment['comment_post_ID'] ); | 
| 156 |  | 
| 157 |           if ( ! empty( $comment['user_ID'] ) ) { | 
| 158 |                $comment['user_role'] = Akismet::get_user_roles( $comment['user_ID'] ); | 
| 159 |           } | 
| 160 |  | 
| 161 |           /** See filter documentation in init_hooks(). */ | 
| 162 |           $akismet_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) ); | 
| 163 |           $comment['akismet_comment_nonce'] = 'inactive'; | 
| 164 |           if ( $akismet_nonce_option == 'true' || $akismet_nonce_option == '' ) { | 
| 165 |                $comment['akismet_comment_nonce'] = 'failed'; | 
| 166 |                if ( isset( $_POST['akismet_comment_nonce'] ) && wp_verify_nonce( $_POST['akismet_comment_nonce'], 'akismet_comment_nonce_' . $comment['comment_post_ID'] ) ) | 
| 167 |                     $comment['akismet_comment_nonce'] = 'passed'; | 
| 168 |  | 
| 169 |                // comment reply in wp-admin | 
| 170 |                if ( isset( $_POST['_ajax_nonce-replyto-comment'] ) && check_ajax_referer( 'replyto-comment', '_ajax_nonce-replyto-comment' ) ) | 
| 171 |                     $comment['akismet_comment_nonce'] = 'passed'; | 
| Line | Code | 
| 921 |            * Don't return boolean false, because that implies that the 'akismet_comment_nonce' option | 
| 922 |            * has not been set and that Akismet should just choose the default behavior for that | 
| 923 |            * situation. | 
| 924 |            */ | 
| 925 |            | 
| 926 |           if ( ! self::get_api_key() ) { | 
| 927 |                return; | 
| 928 |           } | 
| 929 |            | 
| 930 |           $akismet_comment_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) ); | 
| 931 |  | 
| 932 |           if ( $akismet_comment_nonce_option == 'true' || $akismet_comment_nonce_option == '' ) { | 
| 933 |                echo '<p style="display: none;">'; | 
| 934 |                wp_nonce_field( 'akismet_comment_nonce_' . $post_id, 'akismet_comment_nonce', FALSE ); | 
| 935 |                echo '</p>'; | 
| 936 |           } | 
| 937 |      } | 
| 938 |  | 
| 939 |      public static function is_test_mode() { |