Make WordPress Core

Opened 16 years ago

Closed 15 years ago

#10800 closed enhancement (duplicate)

Allow LIKE comparison for $q['meta_compare']

Reported by: johncoswell's profile johncoswell Owned by: ryan's profile ryan
Milestone: Priority: lowest
Severity: trivial Version: 2.8.4
Component: Query Keywords:
Focuses: Cc:

Description

I am working on a plugin that will be doing plaintext searches of a metadata property. It would be helpful to have the LIKE operator available to 'meta_compare' within WP_Query::get_posts so that I don't have to create a new filter to accomplish the same result:

in_array($q['meta_compare'], array('=', '!=', '>', '>=', '<', '<=', 'LIKE'))

Change History (3)

#1 @johnbillion
16 years ago

NOT LIKE and IN would be handy too

#2 @dd32
16 years ago

See Also: #9124 - meta_compare needs to allow "in" as well

#3 @westi
15 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Closing as a dupe of #11482 as that is for the same enhancement and has a patch.

Note: See TracTickets for help on using tickets.