diff --git wp-includes/query.php wp-includes/query.php
index 04286aa..88f63a6 100644
|
|
|
class WP_Query { |
| 2361 | 2361 | $orderby = "FIELD( {$wpdb->posts}.post_parent, $post_parent__in )"; |
| 2362 | 2362 | } else { |
| 2363 | 2363 | // Used to filter values |
| 2364 | | $allowed_keys = array('name', 'author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand', 'comment_count'); |
| | 2364 | $allowed_keys = array( 'name', 'author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand', 'comment_count', 'comment_date' ); |
| 2365 | 2365 | if ( !empty($q['meta_key']) ) { |
| 2366 | 2366 | $allowed_keys[] = $q['meta_key']; |
| 2367 | 2367 | $allowed_keys[] = 'meta_value'; |
| … |
… |
class WP_Query { |
| 2396 | 2396 | case 'comment_count': |
| 2397 | 2397 | $orderby = "$wpdb->posts.comment_count"; |
| 2398 | 2398 | break; |
| | 2399 | case 'comment_date': |
| | 2400 | $orderby = "$wpdb->comments.comment_date"; |
| | 2401 | $join .= " LEFT JOIN $wpdb->comments ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID "; |
| | 2402 | break; |
| 2399 | 2403 | default: |
| 2400 | 2404 | $orderby = "$wpdb->posts.post_" . $orderby; |
| 2401 | 2405 | } |