2653 | | $post['post_status'] = $post_status; |
| 2653 | /** |
| 2654 | * Filter the `post_status` for a post when it is untrashed (restored). |
| 2655 | * |
| 2656 | * By default, posts that are restored will be assigned a post_status |
| 2657 | * of `draft`. Return the `$previous_status` in order to assign the |
| 2658 | * post status that the post had before it was trashed. |
| 2659 | * |
| 2660 | * @param string $new_status The status for a restored post. |
| 2661 | * @param int $post_id The post id of the post being restored. |
| 2662 | * @param string $previous_status The status of the post before it was trashed. |
| 2663 | */ |
| 2664 | $post['post_status'] = apply_filters( 'wp_untrash_post_status', 'draft', $post_id, $previous_status ); |