[wp-trac] [WordPress Trac] #44555: Add hierarchical parameter to comments endpoint

WordPress Trac noreply at wordpress.org
Tue Jul 10 05:08:30 UTC 2018


#44555: Add hierarchical parameter to comments endpoint
-------------------------+-----------------------------
 Reporter:  brgweb       |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  REST API     |    Version:  4.9.6
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44555>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list