untrash_post action-hook . WP 2.9.0
Fires before a post is restored from the Trash.
Usage
add_action( 'untrash_post', 'action_function_name_6210', 10, 2 ); function action_function_name_6210( $post_id, $previous_status ){ // action... }
- $post_id(int)
- Post ID.
- $previous_status(string)
- The status of the post at the point where it was trashed.
Changelog
Since 2.9.0 | Introduced. |
Since 5.6.0 | The $previous_status parameter was added. |
Where the hook is called
wp-includes/post.php 3293
do_action( 'untrash_post', $post_id, $previous_status );