Changeset 29896 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 10/15/2014 12:53:22 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r29891 r29896 692 692 * 693 693 * @since 3.1.0 694 * @since 4.1.0 Added support for $operator 'NOT EXISTS' and 'EXISTS'. 694 695 * @access public 695 696 * 696 697 * @param array $tax_query { 697 * Array of taxono y query clauses.698 * Array of taxonomy query clauses. 698 699 * 699 700 * @type string $relation Optional. The MySQL keyword used to join … … 707 708 * 'name', or 'term_taxonomy_id'. Default: 'term_id'. 708 709 * @type string $operator MySQL operator to be used with $terms in the WHERE clause. 709 * Accepts 'AND', 'IN', or 'OR. Default: 'IN'. 710 * Accepts 'AND', 'IN', 'NOT IN', 'EXISTS', 'NOT EXISTS'. 711 * Default: 'IN'. 710 712 * @type bool $include_children Optional. Whether to include child terms. 711 713 * Requires a $taxonomy. Default: true. … … 1027 1029 AND object_id = $this->primary_table.$this->primary_id_column 1028 1030 ) = $num_terms"; 1031 1032 } elseif ( 'NOT EXISTS' === $operator || 'EXISTS' === $operator ) { 1033 1034 $where = $wpdb->prepare( "$operator ( 1035 SELECT 1 1036 FROM $wpdb->term_relationships 1037 INNER JOIN $wpdb->term_taxonomy 1038 ON $wpdb->term_taxonomy.term_taxonomy_id = $wpdb->term_relationships.term_taxonomy_id 1039 WHERE $wpdb->term_taxonomy.taxonomy = %s 1040 AND $wpdb->term_relationships.object_id = $this->primary_table.$this->primary_id_column 1041 )", $clause['taxonomy'] ); 1042 1029 1043 } 1030 1044
Note: See TracChangeset
for help on using the changeset viewer.