Make WordPress Core

Changeset 23325


Ignore:
Timestamp:
01/22/2013 04:54:38 PM (12 years ago)
Author:
nacin
Message:

Comment Query: Use $this->query_vars instead of the nonexistent shorthand $q. see #23208.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment.php

    r23320 r23325  
    293293            );
    294294            if ( ! empty( $this->query_vars['meta_key'] ) ) {
    295                 $allowed_keys[] = $q['meta_key'];
     295                $allowed_keys[] = $this->query_vars['meta_key'];
    296296                $allowed_keys[] = 'meta_value';
    297297                $allowed_keys[] = 'meta_value_num';
     
    299299            $ordersby = array_intersect( $ordersby, $allowed_keys );
    300300            foreach ( $ordersby as $key => $value ) {
    301                 if ( $value == $q['meta_key'] || $value == 'meta_value' ) {
     301                if ( $value == $this->query_vars['meta_key'] || $value == 'meta_value' ) {
    302302                    $ordersby[ $key ] = "$wpdb->commentmeta.meta_value";
    303303                } elseif ( $value == 'meta_value_num' ) {
Note: See TracChangeset for help on using the changeset viewer.