comment_on_trash
Fires when a comment is attempted on a trashed post.
Usage
add_action( 'comment_on_trash', 'wp_kama_comment_on_trash_action' );
/**
* Function for `comment_on_trash` action-hook.
*
* @param int $comment_post_id Post ID.
*
* @return void
*/
function wp_kama_comment_on_trash_action( $comment_post_id ){
// action...
}
- $comment_post_id(int)
- Post ID.
Changelog
| Since 2.9.0 | Introduced. |
Where the hook is called
comment_on_trash
wp-includes/comment.php 3695
do_action( 'comment_on_trash', $comment_post_id );