[wp-trac] [WordPress Trac] #11076: In get_terms(), allow 'include' & 'exclude' args to be arrays

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 8 09:21:30 UTC 2010


#11076: In get_terms(), allow 'include' & 'exclude' args to be arrays
------------------------------+---------------------------------------------
 Reporter:  scribu            |        Owner:  filosofo
     Type:  enhancement       |       Status:  closed  
 Priority:  normal            |    Milestone:  3.0     
Component:  Taxonomy          |      Version:          
 Severity:  normal            |   Resolution:  fixed   
 Keywords:  has-patch commit  |  
------------------------------+---------------------------------------------

Comment(by sirzooro):

 I think it will be better to change generated SQL from:
 {{{
 AND (t.term_id = 1 OR t.term_id = 2 OR ...)
 AND (t.term_id <> 1 AND t.term_id <> 2 AND ...)
 }}}
 to:
 {{{
 AND t.term_id IN (1, 2, ...)
 AND t.term_id NOT IN (1, 2, ...)
 }}}

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


More information about the wp-trac mailing list