Add ?parent=<id> support for attachments; update Post _link#1777
Add ?parent=<id> support for attachments; update Post _link#1777
?parent=<id> support for attachments; update Post _link#1777Conversation
Also stubs `get_collection_params()` abstraction for Posts controller to make it possible for attachments controller to add `?parent=<id>` support
|
@WP-API/amigos #reviewmerge |
There was a problem hiding this comment.
One thing that's a little dodgy is that any controller extending this controller could use parent in the request, because we pass all arguments present in the request.
Add `?parent=<id>` support for attachments; update Post `_link`
|
Hi! I am using version 2 Beta 10. Can you confirm that this functionality still works ? In my case, it really doesn't work. I am getting empty JSON back when I specify the parent request parameter. Thanks. (Wp v4.4.1) |
Yes, it does.
Please open a new issue for support requests, and we'll help you debug the issue. |
|
Hi, thanks for your answer! Actually I found out why it doesn't work. It's because a media file can be attached only to one post, therefore by simply adding a new media to a post without checking if it's already attached to another one, doesn't mean it is associated with that specific post. I find this really awkward, why can't a media item belong to more than one posts ? Anyways, I know this is a Wordpress issue. Thanks a lot for your answer. |
Right — we still need to sort that out #1987 |
Also stubs
get_collection_params()abstraction for Posts controller tomake it possible for attachments controller to add
?parent=<id>supportFixes #1767