Make WordPress Core

Changeset 25525


Ignore:
Timestamp:
09/20/2013 08:12:11 PM (11 years ago)
Author:
nacin
Message:

Add REGEXP to meta queries.

"REGEXP is usually a terrible idea to use, but I see no reason to disallow it."

props wonderboymusic.
fixes #18736.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/meta.php

    r25269 r25525  
    615615    * - 'value' string|array The meta value
    616616    * - 'compare' (optional) string How to compare the key to the value.
    617     *              Possible values: '=', '!=', '>', '>=', '<', '<=', 'LIKE', 'NOT LIKE', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'.
     617    *              Possible values: '=', '!=', '>', '>=', '<', '<=', 'LIKE', 'NOT LIKE', 'IN', 'NOT IN',
     618    *              'BETWEEN', 'NOT BETWEEN', 'REGEXP', 'NOT REGEXP', 'RLIKE'.
    618619    *              Default: '='
    619620    * - 'type' string (optional) The type of the value.
     
    782783                'IN', 'NOT IN',
    783784                'BETWEEN', 'NOT BETWEEN',
    784                 'NOT EXISTS'
     785                'NOT EXISTS',
     786                'REGEXP', 'NOT REGEXP', 'RLIKE'
    785787            ) ) )
    786788                $meta_compare = '=';
Note: See TracChangeset for help on using the changeset viewer.