akismet_submit_spam_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 | 1025 |
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_spam_comment
add_action('akismet_submit_spam_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:1025
- How this hook is used in WordPress core
<?php
1020
1021 if ( $comment['reporter'] ) {
1022 update_comment_meta( $comment_id, 'akismet_user', $comment['reporter'] );
1023 }
1024
1025 do_action( 'akismet_submit_spam_comment', $comment_id, $response[1] );
1026 }
1027
1028 public static function submit_nonspam_comment( $comment_id ) {
1029 global $wpdb, $current_user, $current_site;
1030
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.