[wp-trac] [WordPress Trac] #23022: Always set posts to draft status when untrashing
WordPress Trac
noreply at wordpress.org
Sun Oct 11 12:28:29 UTC 2020
#23022: Always set posts to draft status when untrashing
---------------------------------------------+-----------------------------
Reporter: harrym | Owner: johnbillion
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 5.6
Component: Posts, Post Types | Version: 2.9
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests commit | Focuses: administration
---------------------------------------------+-----------------------------
Changes (by johnbillion):
* keywords: has-patch has-unit-tests => has-patch has-unit-tests commit
Comment:
This change works fine when `MEDIA_TRASH` is in use because
`wp_insert_post()` converts most post statuses to `inherit` when working
with the `attachment` post type, but just for clarity I've added a line to
explicitly use `inherit` for attachments.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23022#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list