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