Add term_taxonomy_id field handling to WP_Tax_Query::transform_query(), allowing the transformation to be bypassed when tt ids are passed.
props wonderboymusic. fixes #21228. git-svn-id: http://core.svn.wordpress.org/trunk@21552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bfaaa3d8ab
commit
9eeccc2230
|
@ -790,7 +790,14 @@ class WP_Tax_Query {
|
|||
AND $wpdb->terms.{$query['field']} IN ($terms)
|
||||
" );
|
||||
break;
|
||||
|
||||
case 'term_taxonomy_id':
|
||||
$terms = implode( ',', array_map( 'intval', $query['terms'] ) );
|
||||
$terms = $wpdb->get_col( "
|
||||
SELECT $resulting_field
|
||||
FROM $wpdb->term_taxonomy
|
||||
WHERE term_taxonomy_id IN ($terms)
|
||||
" );
|
||||
break;
|
||||
default:
|
||||
$terms = implode( ',', array_map( 'intval', $query['terms'] ) );
|
||||
$terms = $wpdb->get_col( "
|
||||
|
|
Loading…
Reference in New Issue