Fix meta query in WP_User_Query. See #14572
git-svn-id: http://svn.automattic.com/wordpress/trunk@15570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c02669236e
commit
7b26cd223f
|
@ -461,11 +461,11 @@ class WP_User_Query {
|
||||||
$meta_queries[] = $cap_meta_query;
|
$meta_queries[] = $cap_meta_query;
|
||||||
}
|
}
|
||||||
|
|
||||||
$meta_queries[] = array(
|
$meta_query = array();
|
||||||
'meta_key' => @$qv['meta_key'],
|
foreach ( array( 'meta_key', 'meta_value', 'meta_compare' ) as $key )
|
||||||
'meta_value' => @$qv['meta_key'],
|
if ( isset( $qv[ $key ] ) )
|
||||||
'meta_compare' => @$qv['meta_key'],
|
$meta_query[ $key ] = $qv[ $key ];
|
||||||
);
|
$meta_queries[] = $meta_query;
|
||||||
|
|
||||||
$meta_query_sql = _wp_meta_sql( $meta_queries, 'user_id', $wpdb->usermeta );
|
$meta_query_sql = _wp_meta_sql( $meta_queries, 'user_id', $wpdb->usermeta );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue