WPDev.one
Core Function
View Source on Trac ↗

wp_untrash_post()

wp_untrash_post( mixed $post_id = 0 )

Restores a post from the Trash.

Parameters 0 required

Name / Type Description
$post_id
int

Optional. Post ID. Default is the ID of the global `$post`.

Return Value

((WP_Post)
| false | null) Post data on success, false or null on failure.

Function Information

Since Version
2.9.0
Source File
wp-includes/post.php
Advertisement