[wp-trac] [WordPress Trac] #17165: Introduce WP_Meta_Query

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 22 20:39:37 UTC 2011


#17165: Introduce WP_Meta_Query
-------------------------------------+------------------
 Reporter:  scribu                   |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  3.2
Component:  Query                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+------------------

Comment (by scribu):

 Replying to [comment:16 ryan]:
 > Now that we're on PHP5 can we lose call_user_func_array() on get_sql()
 and simply do $this->meta_query->get_sql( 'post', $wpdb->posts, 'ID',
 $this)?

 Done: [attachment:17165.7.diff]

 > Should the constructor call parse_query_vars() on $meta_query?

 No, the constructor accepts only the value of the 'meta_query' var, while
 parse_query_vars() accepts the entire array of query vars.

 When the 'relation' arg is introduced, parse_query_vars() will probably
 call the constructor, not the other way around.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17165#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list