From cff31ae5f5d3b70987b5f9a56efd00ef29d9ea51 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 30 Sep 2011 16:43:57 +0000 Subject: [PATCH] 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 --- wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index f47a860a2d..34864b94fa 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -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';