[wp-trac] [WordPress Trac] #9153: wp_list_pages cannot handle multiple exclude_tree arguments

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 26 20:32:52 UTC 2011


#9153: wp_list_pages cannot handle multiple exclude_tree arguments
--------------------------+-----------------------------
 Reporter:  tbrams        |       Owner:  tbrams
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Future Release
Component:  Template      |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+-----------------------------

Comment (by roothorick):

 Why hasn't the original, first patch been committed yet? It's only slower
 in the cases where the bug manifests, so there is no sane reason why this
 bug has been left open for two years.

 I've been over get_pages() a couple times now, and the optimization
 suggested by Denis-de-Bernardy isn't realistic. You'd have to rewrite
 get_pages() and essentially have two copies of the same function -- one
 that uncondititonally gathers all pages from the DB and filters them by
 hand, and one that filters at the database level like it does now. Unless
 there's a magic SQL trick to recursively look up keys by parent...

 You should commit the original patch that tbrams submitted. Barring
 something unreasonably clever, it's the most appropriate solution
 possible.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9153#comment:31>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list