Ticket #13729: orderby post__in.2.diff
File orderby post__in.2.diff, 613 bytes (added by , 13 years ago) |
---|
-
wp-includes/query.php
2315 2315 $orderby = "$wpdb->posts.post_date " . $q['order']; 2316 2316 } elseif ( 'none' == $q['orderby'] ) { 2317 2317 $orderby = ''; 2318 } elseif ( $q['orderby'] == 'post__in' && ! empty( $post__in ) ) { 2319 $orderby = "find_in_set(ID, '" . $post__in . "')"; 2318 2320 } else { 2319 2321 // Used to filter values 2320 2322 $allowed_keys = array('author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand', 'comment_count');