Repository navigation
Try adding attachment trashable status to REST API - #9210
tellthemachines wants to merge 2 commits into
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
The unit tests getting failed. Needs some updates in |
|
For consistency, this should use the same behaviour as Given that this isn't directly part of the data, imo it would make most sense to handle this via |
Hmm yeah I wondered about that, but If I'm honest I also don't love the ergonomics of exposing actions as links considering that we're usually looking for a boolean value, and we're having to sort of deduce it from the existence of a link 😅 |
|
Came across this PR while searching for existing tickets. Here's an alternative using action links: #14033. |
|
Closing in favour of #14033. |
Adding a
trashableproperty to the attachment schema that checks the MEDIA_TRASH constant.Will be needed to display the correct actions for media items in data views.
Trac ticket: https://core.trac.wordpress.org/ticket/63670
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.