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:
ryan 2011-09-30 16:43:57 +00:00
parent 816fcad9e2
commit 559085db40
1 changed files with 1 additions and 1 deletions

View File

@ -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';