delete_comment хук-событиеWP 1.2.0

Fires immediately before a comment is deleted from the database.

Использование

add_action( 'delete_comment', 'wp_kama_delete_comment_action', 10, 2 );

/**
 * Function for `delete_comment` action-hook.
 * 
 * @param string     $comment_id The comment ID as a numeric string.
 * @param WP_Comment $comment    The comment to be deleted.
 *
 * @return void
 */
function wp_kama_delete_comment_action( $comment_id, $comment ){

	// action...
}
$comment_id(строка)
The comment ID as a numeric string.
$comment(WP_Comment)
The comment to be deleted.

Список изменений

С версии 1.2.0 Введена.
С версии 4.9.0 Added the $comment parameter.

Где вызывается хук

wp_delete_comment()
delete_comment
wp-includes/comment.php 1468
do_action( 'delete_comment', $comment->comment_ID, $comment );

Где используется хук в WordPress

Использование не найдено.