[wp-trac] [WordPress Trac] #42409: Add LIKE support to meta_key comparisons in WP_Meta_Query

WordPress Trac noreply at wordpress.org
Thu Mar 1 04:02:43 UTC 2018


#42409: Add LIKE support to meta_key comparisons in WP_Meta_Query
-------------------------------------------------+-------------------------
 Reporter:  Otto42                               |       Owner:
     Type:  enhancement                          |  boonebgorges
 Priority:  normal                               |      Status:  closed
Component:  Query                                |   Milestone:  5.0
 Severity:  normal                               |     Version:  4.9
 Keywords:  good-first-bug has-patch has-unit-   |  Resolution:  fixed
  tests 2nd-opinion                              |     Focuses:
-------------------------------------------------+-------------------------
Changes (by boonebgorges):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"42768"]:
 {{{
 #!CommitTicketReference repository="" revision="42768"
 Allow `LIKE` queries against the 'key' value in meta queries.

 The new `compare_key=LIKE` parameter works in conjunction with `key` in a
 similar way to the `compare=LIKE` and `value`: by doing a "compares"
 `LIKE`
 query. This allows developers to do partial matches against keys when
 doing meta queries.

 Props mariovalney, chasewg.
 Fixes #42409.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42409#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list