Add name to list of allowed keys. Props MarcusPope. fixes #18638
git-svn-id: http://svn.automattic.com/wordpress/trunk@18838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
816fcad9e2
commit
559085db40
|
@ -2329,7 +2329,7 @@ class WP_Query {
|
||||||
$orderby = '';
|
$orderby = '';
|
||||||
} else {
|
} else {
|
||||||
// Used to filter values
|
// Used to filter values
|
||||||
$allowed_keys = array('author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand', 'comment_count');
|
$allowed_keys = array('name', 'author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand', 'comment_count');
|
||||||
if ( !empty($q['meta_key']) ) {
|
if ( !empty($q['meta_key']) ) {
|
||||||
$allowed_keys[] = $q['meta_key'];
|
$allowed_keys[] = $q['meta_key'];
|
||||||
$allowed_keys[] = 'meta_value';
|
$allowed_keys[] = 'meta_value';
|
||||||
|
|
Loading…
Reference in New Issue