WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Action Reference/untrash post

Description

untrash_post is fired before un-deletion of a post/page.

Parameters

$post_id

Definition(s)

/wp-includes/post.php #L2439
(#2439)

The $post_id parameter is the same value that was passed to wp_untrash_post()

Hook: do_action( 'wp_untrash_post', $post_id );