[wp-trac] [WordPress Trac] #16152: category__in now shows posts from children categories too

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 9 16:48:19 UTC 2011


#16152: category__in now shows posts from children categories too
------------------------------+------------------
 Reporter:  linuxologos       |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  3.1
Component:  Query             |     Version:  3.1
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+------------------

Comment (by ryan):

 Actually, since the children are not put back into the 'cat' arg we won't
 have to look up children for the children on the second pass. We're still
 unnecessarily finding the children for the terms in 'cat' again, however.
 parse_tax_query() may need an extra arg indicating that it is being called
 a second time.  The second call to parse_tax_query(), right before
 get_sql(), could pass this flag and cause parse_tax_query() to skip the
 'cat' block.

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


More information about the wp-trac mailing list