Recognize meta_query as a query var. Props aaroncampbell. Fixes #14645

git-svn-id: http://svn.automattic.com/wordpress/trunk@15713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-10-04 17:51:17 +00:00
parent 7119d7429e
commit 6107efe572
1 changed files with 6 additions and 3 deletions

View File

@ -1168,8 +1168,6 @@ class WP_Query {
, 'tb'
, 'paged'
, 'comments_popup'
, 'meta_key'
, 'meta_value'
, 'preview'
, 's'
, 'sentence'
@ -1391,7 +1389,12 @@ class WP_Query {
$this->is_tax = true;
}
if ( !empty( $qv['meta_query'] ) && is_array( $qv['meta_query'] ) ) {
$this->meta_query = $qv['meta_query'];
}
$meta_query = wp_array_slice_assoc( $qv, array( 'meta_key', 'meta_value', 'meta_compare' ) );
if ( !empty( $meta_query ) )
$this->meta_query[] = $meta_query;