Make WordPress Core


Ignore:
Timestamp:
04/12/2014 07:03:56 PM (10 years ago)
Author:
nacin
Message:

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

fixes #21119.

File:
1 edited

Legend:

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

    r28015 r28087  
    666666            }
    667667
    668             $qv['meta_query'][] = $cap_meta_query;
     668            if ( empty( $qv['meta_query'] ) || ! in_array( $cap_meta_query, $qv['meta_query'], true ) ) {
     669                $qv['meta_query'][] = $cap_meta_query;
     670            }
    669671        }
    670672
Note: See TracChangeset for help on using the changeset viewer.