[wp-trac] [WordPress Trac] #15018: Filtering get_meta_sql for advanced queries

WordPress Trac noreply at wordpress.org
Mon Jan 30 03:27:18 UTC 2017


#15018: Filtering get_meta_sql for advanced queries
-------------------------+---------------------
 Reporter:  sc0ttkclark  |       Owner:  scribu
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  3.1
Component:  Plugins      |     Version:  3.1
 Severity:  normal       |  Resolution:  fixed
 Keywords:               |     Focuses:
-------------------------+---------------------

Comment (by onokazu):

 WP_Term_Query should also pass itself to WP_Meta_Query::get_sql() so that
 it can be accessed through the get_meta_sql filter.

 wp-includes/class-wp-term-query.php: 567

 {{{
 $mq_sql = $this->meta_query->get_sql( 'term', 't', 'term_id' );
 }}}

 needs to be changed to:

 {{{
 $mq_sql = $this->meta_query->get_sql( 'term', 't', 'term_id', $this );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/15018#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list