get_pages() with child_of forgets sort
|Reported by:||janfabry||Owned by:|
|Component:||Posts, Post Types||Keywords:||has-patch dev-feedback|
If you call get_pages() with both the child_of and sort_column, the sorting is not applied.
child_of makes it select all pages (sorted) and later applies a subselect via get_page_children(). This subselect can mess up the sort order.
An example was reported on http://wordpress.stackexchange.com/questions/16921/get-pages-not-ordering-as-it-should
Change History (8)
comment:2 jessepollak — 8 weeks ago
- Keywords needs-patch added
- Keywords needs-unit-tests added
- Milestone changed from Awaiting Review to Future Release
comment:7 jessepollak — 8 weeks ago
- Keywords has-patch dev-feedback added; needs-patch needs-unit-tests removed