WordPress.org

Make WordPress Core

Opened 9 years ago

Last modified 8 years ago

#16829 closed enhancement

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

Reported by: scribu Owned by:
Milestone: 3.3 Priority: normal
Severity: normal Version:
Component: Query Keywords: has-patch
Focuses: Cc:
PR Number:

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.