Ticket #13729: 13729-FIELD.diff
File 13729-FIELD.diff, 633 bytes (added by , 12 years ago) |
---|
-
wp-includes/query.php
class WP_Query { 2331 2331 $orderby = "$wpdb->posts.post_date " . $q['order']; 2332 2332 } elseif ( 'none' == $q['orderby'] ) { 2333 2333 $orderby = ''; 2334 } elseif ( $q['orderby'] == 'post__in' && ! empty( $post__in ) ) { 2335 $orderby = "FIELD( {$wpdb->posts}.ID, $post__in )"; 2334 2336 } else { 2335 2337 // Used to filter values 2336 2338 $allowed_keys = array('name', 'author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand', 'comment_count');