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

WordPress Trac noreply at wordpress.org
Wed Dec 3 01:16:51 UTC 2014


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

Comment (by dd32):

 > Thanks for looking into this, dd32.
 I'm not going to lie, I spent lots of hours trying to work out why
 `wp_list_pages()` was breaking :)

 > I don't think it's possible to salvage this. For 4.1, I recommend
 reverting the changes in get_pages() and get_page_children() back to what
 they were in 4.0.

 Yep, I wasn't going to suggest that straight up as I was hoping someone
 would go "Oh, we just have to do x!", but it's quite likely that's not
 possible, and a revert is in order.

 > For 4.2 and beyond, we can look into building a properly tree recurser -
 something like get_page_children() (maybe get_page_descendants()?), but
 which *would* perform SQL queries to get each level of child,
 Sounds like a good idea. Pages, especially when there's lots of them (with
 multiple depths) has some serious performance issues, so looking at
 writing something like that could be a big benefit.

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


More information about the wp-trac mailing list