untrashed_comment
Fires immediately after a comment is restored from the Trash.
Description
Parameters (1)
- 0. $comment_comment_id (int)
- The comment comment id.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'untrashed_comment', $comment_comment_id );
- The following example is for adding a hook callback.
- // define the untrashed_comment callback
- function action_untrashed_comment( $comment_comment_id ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'untrashed_comment', 'action_untrashed_comment', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'untrashed_comment', 'action_untrashed_comment', 10, 1 );
Defined (1)
The action is defined in the following location(s).
- /wp-includes/comment.php
- do_action( 'untrashed_comment', $comment->comment_ID );