Changeset 36004 for branches/4.4/src/wp-includes/taxonomy.php
- Timestamp:
- 12/18/2015 05:48:33 PM (9 years ago)
- Location:
- branches/4.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4
-
branches/4.4/src/wp-includes/taxonomy.php
r35725 r36004 1354 1354 // Meta query support. 1355 1355 $join = ''; 1356 $distinct = ''; 1356 1357 if ( ! empty( $args['meta_query'] ) ) { 1357 1358 $mquery = new WP_Meta_Query( $args['meta_query'] ); … … 1360 1361 $join .= $mq_sql['join']; 1361 1362 $where .= $mq_sql['where']; 1363 $distinct .= "DISTINCT"; 1362 1364 } 1363 1365 … … 1409 1411 $join .= " INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id"; 1410 1412 1411 $pieces = array( 'fields', 'join', 'where', ' orderby', 'order', 'limits' );1413 $pieces = array( 'fields', 'join', 'where', 'distinct', 'orderby', 'order', 'limits' ); 1412 1414 1413 1415 /** … … 1425 1427 $join = isset( $clauses[ 'join' ] ) ? $clauses[ 'join' ] : ''; 1426 1428 $where = isset( $clauses[ 'where' ] ) ? $clauses[ 'where' ] : ''; 1429 $distinct = isset( $clauses[ 'distinct' ] ) ? $clauses[ 'distinct' ] : ''; 1427 1430 $orderby = isset( $clauses[ 'orderby' ] ) ? $clauses[ 'orderby' ] : ''; 1428 1431 $order = isset( $clauses[ 'order' ] ) ? $clauses[ 'order' ] : ''; 1429 1432 $limits = isset( $clauses[ 'limits' ] ) ? $clauses[ 'limits' ] : ''; 1430 1433 1431 $query = "SELECT $ fields FROM $wpdb->terms AS t $join WHERE $where $orderby $order $limits";1434 $query = "SELECT $distinct $fields FROM $wpdb->terms AS t $join WHERE $where $orderby $order $limits"; 1432 1435 1433 1436 // $args can be anything. Only use the args defined in defaults to compute the key.
Note: See TracChangeset
for help on using the changeset viewer.