untrashed_post_comments
Fires after comments are restored for a post from the trash.
Description
Parameters (1)
- 0. $post_id (int)
- The post id.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'untrashed_post_comments', $post_id );
- The following example is for adding a hook callback.
- // define the untrashed_post_comments callback
- function action_untrashed_post_comments( $post_id ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'untrashed_post_comments', 'action_untrashed_post_comments', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'untrashed_post_comments', 'action_untrashed_post_comments', 10, 1 );
Defined (1)
The action is defined in the following location(s).
- /wp-includes/post.php
- do_action( 'untrashed_post_comments', $post_id );