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