spam_comment хук-событие . WP 2.9.0
Fires immediately before a comment is marked as Spam.
Использование
add_action( 'spam_comment', 'action_function_name_5671', 10, 2 ); function action_function_name_5671( $comment_id, $comment ){ // action... }
- $comment_id(число)
- The comment ID.
- $comment(WP_Comment)
- The comment to be marked as spam.
Список изменений
С версии 2.9.0 | Введена. |
С версии 4.9.0 | Added the $comment parameter. |
Где вызывается хук
spam_comment
wp-includes/comment.php 1662
do_action( 'spam_comment', $comment->comment_ID, $comment );