Make WordPress Core

Changes between Initial Version and Version 7 of Ticket #63670


Ignore:
Timestamp:
07/29/2025 07:07:05 AM (11 months ago)
Author:
isabel_brison
Comment:

Thinking about this more, and on a suggestion by @talldanwp, I'm updating the scope of this ticket to apply not just to the attachment controller, but to the posts controller. The logic is that there are other default post types not trashable by default (such as templates), but the "rest_{$this->post_type}_trashable" could potentially be used to change this for any post type.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #63670

    • Property Keywords has-patch added
    • Property Summary changed from Add trashability to REST API attachment controller to Add trashability to REST API posts controller
  • Ticket #63670 – Description

    initial v7  
    1 Would be good to have a `trashable` property to the attachment schema that checks the MEDIA_TRASH constant.
     1Would be good to have a `trashable` property to the posts schema that checks the "rest_{$this->post_type}_trashable" filter and, in the case of attachment post type, the MEDIA_TRASH constant too.
    22
    3 This will be needed to display the correct actions for media items in data views.
     3This will be needed to display the correct actions for media items in data views, and also for other post types to which the filter may be applied.