Ticket #9228: no_cat_order.9228.diff

File no_cat_order.9228.diff, 635 bytes (added by filosofo, 4 years ago)
Line 
1Index: wp-includes/query.php
2===================================================================
3--- wp-includes/query.php       (revision 10643)
4+++ wp-includes/query.php       (working copy)
5@@ -2019,7 +2019,7 @@
6                        $q['orderby'] = "$wpdb->posts.post_date ".$q['order'];
7                } else {
8                        // Used to filter values
9-                       $allowed_keys = array('author', 'date', 'category', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand');
10+                       $allowed_keys = array('author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand');
11                        if ( !empty($q['meta_key']) ) {
12                                $allowed_keys[] = $q['meta_key'];
13                                $allowed_keys[] = 'meta_value';