WordPress.org

Make WordPress Core

Opened 16 months ago

Last modified 7 weeks ago

#23022 new enhancement

Always set posts to draft status when untrashing

Reported by: harrym Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.9
Component: Posts, Post Types Keywords: has-patch 2nd-opinion editorial-flow
Focuses: Cc:

Description

In some situations it is bad when trashed posts immediately go live after being untrashed. Such as:

  • A published post is found to have libellous/wrong/other_bad content in it
  • Admin trashes the post
  • Admin wants to edit the post and republish it without the bad things
  • Admin cannot do this without republishing the bad things, which they cannot do.

I appreciate that the user should have unpublished the post rather than trashing it but people don't always think clearly in these situations, and once you're in it, you can't get out -- your options are to republish, permanently delete, or leave the post in limbo.

I did wonder if it would be better to make trashed posts viewable/editable in the admin but that felt like a pretty big move, and one that would make the status of a trashed post much less clear and rather ambiguous.

So, the attached patch sets all untrashed posts to draft status, rather than restoring their original status, which was the only other thing I could think of.

(Definitely happy to debate alternative solutions)

Attachments (2)

alwaysdraft.diff (533 bytes) - added by harrym 16 months ago.
Sets untrashed posts to draft status instead of their original status
23022.2.patch (761 bytes) - added by bananastalktome 15 months ago.

Download all attachments as: .zip

Change History (10)

harrym16 months ago

Sets untrashed posts to draft status instead of their original status

comment:1 SergeyBiryukov16 months ago

  • Version changed from trunk to 3.5

comment:2 nacin16 months ago

  • Component changed from Administration to Trash
  • Version changed from 3.5 to 2.9

bananastalktome15 months ago

comment:3 bananastalktome15 months ago

Should probably also stop adding _wp_trash_meta_status to a post as well, then (patch by @harrym updated to include this)

comment:4 kovshenin15 months ago

  • Cc kovshenin added
  • Keywords editorial-flow added

comment:5 follow-up: harrym6 months ago

Is it possible to consider this for inclusion in 3.7?

comment:6 in reply to: ↑ 5 DrewAPicture6 months ago

  • Milestone changed from Awaiting Review to Future Release

Replying to harrym:

Is it possible to consider this for inclusion in 3.7?

It's too late for 3.7 as it's an enhancement and we're already in beta. 3.8 may be a possibility though.

comment:7 nacin2 months ago

  • Component changed from Trash to Posts, Post Types
Note: See TracTickets for help on using tickets.