WordPress.org

Make WordPress Core

Ticket #17235: 17235-meta.diff

File 17235-meta.diff, 508 bytes (added by batmoo, 7 years ago)
  • wp-includes/meta.php

     
    422422
    423423                $this->queries = array();
    424424
     425                // Single meta queries shouldn't need to pass an array of arrays
     426                if( isset( $meta_query['key'] ) || isset( $meta_query['value'] ) )
     427                        $meta_query = array( $meta_query );
     428               
    425429                foreach ( $meta_query as $key => $query ) {
    426430                        if ( ! is_array( $query ) )
    427431                                continue;