akismet_comment_check_response
Action HookDescription
Filter the data that is used to generate the request body for the API call.Hook Information
File Location |
wp-content/plugins/akismet/class.akismet.php
View on GitHub
|
Hook Type | Action |
Line Number | 379 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$comment
|
An array of request data. |
string
|
$endpoint
|
The API endpoint being requested. |
Usage Examples
Basic Usage
<?php
// Hook into akismet_comment_check_response
add_action('akismet_comment_check_response', 'my_custom_function', 10, 2);
function my_custom_function($comment, $endpoint) {
// Your custom code here
}
Source Code Context
wp-content/plugins/akismet/class.akismet.php:379
- How this hook is used in WordPress core
<?php
374 */
375 $comment = apply_filters( 'akismet_request_args', $comment, 'comment-check' );
376
377 $response = self::http_post( self::build_query( $comment ), 'comment-check' );
378
379 do_action( 'akismet_comment_check_response', $response );
380
381 $commentdata['comment_as_submitted'] = array_intersect_key( $comment, self::$comment_as_submitted_allowed_keys );
382
383 // Also include any form fields we inject into the comment form, like ak_js
384 foreach ( $_POST as $key => $value ) {
PHP Documentation
<?php
/**
* Filter the data that is used to generate the request body for the API call.
*
* @since 5.3.1
*
* @param array $comment An array of request data.
* @param string $endpoint The API endpoint being requested.
*/
Quick Info
- Hook Type: Action
- Parameters: 2
- File: wp-content/plugins/akismet/class.akismet.php
Related Hooks
Related hooks will be displayed here in future updates.