WPDev.one
Core Function
View Source on Trac ↗

wp_untrash_post_set_previous_status()

wp_untrash_post_set_previous_status( mixed $new_status, mixed $post_id, mixed $previous_status )

Filters callback which sets the status of an untrashed post to its previous status.

Parameters 3 required

Name / Type Description
$new_status
string

The new status of the post being restored.

Required
$post_id
int

The ID of the post being restored.

Required
$previous_status
string

The status of the post at the point where it was trashed.

Required

Return Value

(string)
The new status of the post.

Function Information

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