User Query: Don't blindly re-append new meta queries for capabilities.

fixes #21119.

Built from https://develop.svn.wordpress.org/trunk@28087


git-svn-id: http://core.svn.wordpress.org/trunk@27918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-04-12 19:04:15 +00:00
parent d50e4bc08c
commit 91971b28a7
1 changed files with 3 additions and 1 deletions

View File

@ -665,7 +665,9 @@ class WP_User_Query {
$cap_meta_query['compare'] = 'like'; $cap_meta_query['compare'] = 'like';
} }
$qv['meta_query'][] = $cap_meta_query; if ( empty( $qv['meta_query'] ) || ! in_array( $cap_meta_query, $qv['meta_query'], true ) ) {
$qv['meta_query'][] = $cap_meta_query;
}
} }
$meta_query = new WP_Meta_Query(); $meta_query = new WP_Meta_Query();