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