[wp-trac] [WordPress Trac] #40029: Media endpoint can return wrong number of results

WordPress Trac noreply at wordpress.org
Sun Mar 26 01:38:09 UTC 2017


#40029: Media endpoint can return wrong number of results
----------------------------+------------------------------
 Reporter:  wonderboymusic  |       Owner:  joehoyle
     Type:  defect (bug)    |      Status:  assigned
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  REST API        |     Version:  4.7
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |     Focuses:
----------------------------+------------------------------
Changes (by joehoyle):

 * owner:   => joehoyle
 * status:  new => assigned


Comment:

 We should either close this or take the parent into account, however to I
 don't think we should go beyond what WP_Query is capable of. If WP_Query
 can't intelligently return the correct number of results then I don't
 think we should patch. The problem is we'll need to recursively fill to
 10, and keep doing more WP_Queries.

 Next step: work out if we can provide additional args to WP_Query when
 getting the list of media so it's returning the correct amount without us
 having to strip them manually PHP-side. I'm pretty sure that's _not_ going
 to be possible though.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40029#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list