akismet_submit_nonspam_comment
Action HookDescription
Log an event for a given comment, storing it in comment_meta.Hook Information
File Location |
wp-content/plugins/akismet/class.akismet.php
View on GitHub
|
Hook Type | Action |
Line Number | 1094 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$comment_id
|
The ID of the relevant comment. |
string
|
$message
|
The string description of the event. No longer used. |
string
|
$event
|
The event code. |
array
|
$meta
|
Metadata about the history entry. e.g., the user that reported or changed the status of a given comment. |
Usage Examples
Basic Usage
<?php
// Hook into akismet_submit_nonspam_comment
add_action('akismet_submit_nonspam_comment', 'my_custom_function', 10, 4);
function my_custom_function($comment_id, $message, $event, $meta) {
// Your custom code here
}
Source Code Context
wp-content/plugins/akismet/class.akismet.php:1094
- How this hook is used in WordPress core
<?php
1089
1090 if ( $comment['reporter'] ) {
1091 update_comment_meta( $comment_id, 'akismet_user', $comment['reporter'] );
1092 }
1093
1094 do_action( 'akismet_submit_nonspam_comment', $comment_id, $response[1] );
1095 }
1096
1097 public static function cron_recheck() {
1098 global $wpdb;
1099
PHP Documentation
<?php
/**
* Log an event for a given comment, storing it in comment_meta.
*
* @param int $comment_id The ID of the relevant comment.
* @param string $message The string description of the event. No longer used.
* @param string $event The event code.
* @param array $meta Metadata about the history entry. e.g., the user that reported or changed the status of a given comment.
*/
Quick Info
- Hook Type: Action
- Parameters: 4
- File: wp-content/plugins/akismet/class.akismet.php
Related Hooks
Related hooks will be displayed here in future updates.