[wp-trac] [WordPress Trac] #14477: get_pages with child_of only works with uninterrupted hierarchies
WordPress Trac
noreply at wordpress.org
Thu Nov 27 02:55:37 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: | Focuses:
--------------------------+-----------------------
Changes (by dd32):
* priority: normal => high
* status: closed => reopened
* resolution: fixed =>
Comment:
This change has broken `get_pages()` with `child_of`, it now returns
duplicates, as I suspect it's pulling from the ancestors for siblings or
something.
[attachment:14477-41-broken-ut.diff 14477-41-broken-ut.diff] contains a
unit test that shows the expected output, and the output I'm seeing on
4.1.
This has a knock on effect to anyone using `wp_list_pages()` and
`child_of` as suddenly they'll get pages showing up at each level
duplicated.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/14477#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list