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.
| Line | Code |
|---|---|
| 207 | // Send to moderation. |
| 208 | self::$last_comment_result = '0'; |
| 209 | } |
| 210 | else if ( 'true' == $response[1] ) { |
| 211 | // akismet_spam_count will be incremented later by comment_is_spam() |
| 212 | self::$last_comment_result = 'spam'; |
| 213 | |
| 214 | $discard = ( isset( $commentdata['akismet_pro_tip'] ) && $commentdata['akismet_pro_tip'] === 'discard' && self::allow_discard() ); |
| 215 | |
| 216 | do_action( 'akismet_spam_caught', $discard ); |
| 217 | |
| 218 | if ( $discard ) { |
| 219 | // The spam is obvious, so we're bailing out early. |
| 220 | // akismet_result_spam() won't be called so bump the counter here |
| 221 | if ( $incr = apply_filters( 'akismet_spam_count_incr', 1 ) ) { |
| 222 | update_option( 'akismet_spam_count', get_option( 'akismet_spam_count' ) + $incr ); |
| 223 | } |
| 224 | |
| 225 | if ( self::$is_rest_api_call ) { |