#44555 closed enhancement (duplicate)
Add hierarchical parameter to comments endpoint
Reported by: | brgweb | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.9.6 |
Component: | REST API | Keywords: | |
Focuses: | Cc: |
Description
I have a performance problem usign REST API to show threaded comments. Right now I need to make a GET request for each comment and then another GET for each of its children. I'd like to make just one GET and receive all the comments threaded as a multidimensional array (or object).
The WP Comment Query Class already implements "hierarchical" paramenter in its constructor. If this parameter is set to 1, or threaded", the comments are organized in a multidimensional array. It would be nice if we could add this parameter to REST API too.
Change History (3)
#1
@
6 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
#2
@
6 years ago
A duplicate indeed, but definite thanks to you @brgweb for adding your voice to the issue. This is something we've been talking about for some time, but hasn't had a champion to take it forward. If you have the bandwidth, I'd welcome your thoughts on #41821 -- or a patch, should you have a good idea about a solution, though I wouldn't want to presume :) We can continue the discussion over there.
Thanks for the bug gardenin, @birgire!
Thanks for the ticket @brgweb
This seems to be a duplicate of #41821 though.