akismet_spam_count_incr
Filter HookDescription
Given a comment ID, retrieve the values that we use for matching comments together.Hook Information
File Location |
wp-content/plugins/akismet/class.akismet.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1371 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$comment_id
|
No description available |
Usage Examples
Basic Usage
<?php
// Hook into akismet_spam_count_incr
add_filter('akismet_spam_count_incr', 'my_custom_filter', 10, 1);
function my_custom_filter($comment_id) {
// Your custom filtering logic here
return $comment_id;
}
Source Code Context
wp-content/plugins/akismet/class.akismet.php:1371
- How this hook is used in WordPress core
<?php
1366 // end up in the trash.
1367 return $approved;
1368 }
1369
1370 // bump the counter here instead of when the filter is added to reduce the possibility of overcounting
1371 if ( $incr = apply_filters( 'akismet_spam_count_incr', 1 ) ) {
1372 update_option( 'akismet_spam_count', get_option( 'akismet_spam_count' ) + $incr );
1373 }
1374
1375 return self::$last_comment_result;
1376 }
PHP Documentation
<?php
/**
* Given a comment ID, retrieve the values that we use for matching comments together.
*
* @param int $comment_id
* @return array An array containing akismet_guid and akismet_skipped_microtime. Either or both may be falsy, but we hope that at least one is a string.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-content/plugins/akismet/class.akismet.php
Related Hooks
Related hooks will be displayed here in future updates.