Make WordPress Core

Opened 12 years ago

Last modified 12 years ago

#16829 closed enhancement

Automatically set 'compare' => 'IN', when meta value is an array — at Initial Version

Reported by: scribu's profile scribu Owned by:
Milestone: 3.3 Priority: normal
Severity: normal Version:
Component: Query Keywords: has-patch
Focuses: Cc:

Description

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'
) );

Change History (0)

Note: See TracTickets for help on using tickets.