| @@ 644-651 (lines=8) @@ | ||
| 641 | AND $wpdb->terms.{$query['field']} IN ($terms) |
|
| 642 | " ); |
|
| 643 | break; |
|
| 644 | case 'term_taxonomy_id': |
|
| 645 | $terms = implode( ',', array_map( 'intval', $query['terms'] ) ); |
|
| 646 | $terms = $wpdb->get_col( " |
|
| 647 | SELECT $resulting_field |
|
| 648 | FROM $wpdb->term_taxonomy |
|
| 649 | WHERE term_taxonomy_id IN ($terms) |
|
| 650 | " ); |
|
| 651 | break; |
|
| 652 | default: |
|
| 653 | $terms = implode( ',', array_map( 'intval', $query['terms'] ) ); |
|
| 654 | $terms = $wpdb->get_col( " |
|
| @@ 652-659 (lines=8) @@ | ||
| 649 | WHERE term_taxonomy_id IN ($terms) |
|
| 650 | " ); |
|
| 651 | break; |
|
| 652 | default: |
|
| 653 | $terms = implode( ',', array_map( 'intval', $query['terms'] ) ); |
|
| 654 | $terms = $wpdb->get_col( " |
|
| 655 | SELECT $resulting_field |
|
| 656 | FROM $wpdb->term_taxonomy |
|
| 657 | WHERE taxonomy = '{$query['taxonomy']}' |
|
| 658 | AND term_id IN ($terms) |
|
| 659 | " ); |
|
| 660 | } |
|
| 661 | ||
| 662 | if ( 'AND' == $query['operator'] && count( $terms ) < count( $query['terms'] ) ) { |
|