[wp-trac] [WordPress Trac] #16829: Automatically set 'compare' => 'IN', when meta value is an array

WordPress Trac wp-trac at lists.automattic.com
Thu Mar 10 22:34:35 UTC 2011


#16829: Automatically set 'compare' => 'IN', when meta value is an array
-------------------------+----------------------------
 Reporter:  scribu       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Future Release
Component:  Query        |    Version:
 Severity:  normal       |   Keywords:  needs-patch
-------------------------+----------------------------
 {{{
 get_posts( array(
   'meta_key' => 'foo',
   'meta_value' => array( 'bar', baz' )
 ) );
 }}}

 should just work.

 Currently, you have to remember to set meta compare:

 {{{
 get_posts( array(
   'meta_key' => 'foo',
   'meta_value' => array( 'bar', baz' ),
   'meta_compare' => 'IN'
 ) );
 }}}

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


More information about the wp-trac mailing list