trashed_post_comments
Fires after comments are sent to the Trash.
Использование
add_action( 'trashed_post_comments', 'wp_kama_trashed_post_comments_action', 10, 2 ); /** * Function for `trashed_post_comments` action-hook. * * @param int $post_id Post ID. * @param array $statuses Array of comment statuses. * * @return void */ function wp_kama_trashed_post_comments_action( $post_id, $statuses ){ // action... }
- $post_id(int)
- Post ID.
- $statuses(массив)
- Array of comment statuses.
Список изменений
С версии 2.9.0 | Введена. |
Где вызывается хук
trashed_post_comments
wp-includes/post.php 4114
do_action( 'trashed_post_comments', $post_id, $statuses );