Add name to list of allowed keys. Props MarcusPope. fixes #18638

git-svn-id: https://develop.svn.wordpress.org/trunk@18838 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2011-09-30 16:43:57 +00:00
parent e8fd0746c8
commit cff31ae5f5
1 changed files with 1 additions and 1 deletions

View File

@ -2329,7 +2329,7 @@ class WP_Query {
$orderby = '';
} else {
// 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']) ) {
$allowed_keys[] = $q['meta_key'];
$allowed_keys[] = 'meta_value';