Ticket #23208: comment-notice.diff
File comment-notice.diff, 863 bytes (added by , 12 years ago) |
---|
-
wp-includes/comment.php
290 290 'user_id', 291 291 ); 292 292 if ( ! empty( $this->query_vars['meta_key'] ) ) { 293 $allowed_keys[] = $q['meta_key'];293 $allowed_keys[] = 'meta_key'; 294 294 $allowed_keys[] = 'meta_value'; 295 295 $allowed_keys[] = 'meta_value_num'; 296 296 } 297 297 $ordersby = array_intersect( $ordersby, $allowed_keys ); 298 298 foreach ( $ordersby as $key => $value ) { 299 if ( $value == $ q['meta_key'] || $value == 'meta_value' ) {299 if ( $value == $this->query_vars['meta_key'] || $value == 'meta_value' ) { 300 300 $ordersby[ $key ] = "$wpdb->commentmeta.meta_value"; 301 301 } elseif ( $value == 'meta_value_num' ) { 302 302 $ordersby[ $key ] = "$wpdb->commentmeta.meta_value+0";