[wp-trac] Re: [WordPress Trac] #1277: Extend is_page() to support child_of and decendent_of

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 29 16:53:31 GMT 2006


#1277: Extend is_page() to support child_of and decendent_of
-------------------------+--------------------------------------------------
 Reporter:  astorm       |        Owner:  anonymous
     Type:  enhancement  |       Status:  new      
 Priority:  normal       |    Milestone:  2.1      
Component:  General      |      Version:  1.5.1    
 Severity:  normal       |   Resolution:           
 Keywords:  has-patch    |  
-------------------------+--------------------------------------------------
Comment (by leflo):

 Scalability: Ok, I changed it a bit, now you only get that query if you
 really need it (descendent_of, ancestor_of), and parent_of has its own
 query now. Anyhow, that query isn't expensive (at least for < 500 pages
 and espacally in contrast to the query for get_pages('')), the other
 option would be to do n queries (n = depth) or do some very tricky SQL
 substatements (which would kill all MySQL 4 support). (Could it be better
 to use get_pages('') since it is/could be cached?)

 Walker Classes: Why? I don't really walk the tree, it's more like zipping
 through a list.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/1277>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list