[wp-trac] [WordPress Trac] #14477: get_pages with child_of only works with uninterrupted hierarchies

WordPress Trac noreply at wordpress.org
Sat Nov 29 19:03:26 UTC 2014


#14477: get_pages with child_of only works with uninterrupted hierarchies
-----------------------------------+-----------------------
 Reporter:  vividvisions           |       Owner:
     Type:  enhancement            |      Status:  reopened
 Priority:  high                   |   Milestone:  4.1
Component:  Query                  |     Version:  3.0
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+-----------------------
Changes (by boonebgorges):

 * keywords:   => has-patch 2nd-opinion


Comment:

 [attachment:14477.5.diff] rolls back [30246] and implements by suggestions
 from https://core.trac.wordpress.org/ticket/14477#comment:8, which is to
 do some simple deduplication before returning the results from
 `get_page_children()`. This fixes all unit tests, including dd32's
 [attachment:14477-41-broken-ut.diff].

 There may be a more efficient way to dedupe than what I've proposed here.
 Suggestions welcome.

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


More information about the wp-trac mailing list