[wp-trac] [WordPress Trac] #40255: Parameter to Enable/Disable Trash on register_post_type();
WordPress Trac
noreply at wordpress.org
Sun Aug 31 22:08:35 UTC 2025
#40255: Parameter to Enable/Disable Trash on register_post_type();
-------------------------------+-------------------------
Reporter: michael.ecklund | Owner: (none)
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Posts, Post Types | Version: 4.7.3
Severity: normal | Resolution: maybelater
Keywords: | Focuses:
-------------------------------+-------------------------
Changes (by SirLouen):
* status: new => closed
* resolution: => maybelater
* milestone: Awaiting Review =>
Comment:
There is no granular Trash disabling option, not even for Pages or Posts.
Almost by the time you posted this,
[https://stackoverflow.com/questions/42516664/disable-wordpress-trash-for-
one-custom-post-type there was a workaround in SO], using `wp_trash_post`
action hook, you can simply force a full deletion without trashing before
it gets to Trash. Technically, this satisfies the exact same purpose as
`EMPTY_TRASH_DAYS` to 0 without having to deal with the `Trash` selectable
menus and laser targeted to your specific CPT.
8 years have passed, and this has received 0 traction, so it doesn't seem
to be a very solicited feature.
For all these reasons, I would rather opt for closing this as
`maybelater`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40255#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list