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. Built from https://develop.svn.wordpress.org/trunk@25525 git-svn-id: http://core.svn.wordpress.org/trunk@25445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
16f0d8b1ea
commit
d814ad50b3
|
@ -614,7 +614,8 @@ class WP_Meta_Query {
|
|||
* - 'key' string The meta key
|
||||
* - 'value' string|array The meta value
|
||||
* - 'compare' (optional) string How to compare the key to the value.
|
||||
* Possible values: '=', '!=', '>', '>=', '<', '<=', 'LIKE', 'NOT LIKE', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'.
|
||||
* Possible values: '=', '!=', '>', '>=', '<', '<=', 'LIKE', 'NOT LIKE', 'IN', 'NOT IN',
|
||||
* 'BETWEEN', 'NOT BETWEEN', 'REGEXP', 'NOT REGEXP', 'RLIKE'.
|
||||
* Default: '='
|
||||
* - 'type' string (optional) The type of the value.
|
||||
* Possible values: 'NUMERIC', 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', 'SIGNED', 'TIME', 'UNSIGNED'.
|
||||
|
@ -781,7 +782,8 @@ class WP_Meta_Query {
|
|||
'LIKE', 'NOT LIKE',
|
||||
'IN', 'NOT IN',
|
||||
'BETWEEN', 'NOT BETWEEN',
|
||||
'NOT EXISTS'
|
||||
'NOT EXISTS',
|
||||
'REGEXP', 'NOT REGEXP', 'RLIKE'
|
||||
) ) )
|
||||
$meta_compare = '=';
|
||||
|
||||
|
|
Loading…
Reference in New Issue