Changeset 29953 for trunk/src/wp-includes/meta.php
- Timestamp:
- 10/18/2014 02:21:33 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/meta.php
r29941 r29953 1332 1332 $join .= $i ? " AS $alias" : ''; 1333 1333 $join .= $wpdb->prepare( " ON ($this->primary_table.$this->primary_id_column = $alias.$this->meta_id_column AND $alias.meta_key = %s )", $clause['key'] ); 1334 $sql_chunks['join'][] = $join;1335 1334 1336 1335 // All other JOIN clauses. 1337 1336 } else { 1338 $alias = $this->find_compatible_table_alias( $clause, $parent_query ); 1339 if ( false === $alias ) { 1340 $alias = $i ? 'mt' . $i : $this->meta_table; 1341 1342 $join .= " INNER JOIN $this->meta_table"; 1343 $join .= $i ? " AS $alias" : ''; 1344 $join .= " ON ( $this->primary_table.$this->primary_id_column = $alias.$this->meta_id_column )"; 1345 } 1337 $join .= " INNER JOIN $this->meta_table"; 1338 $join .= $i ? " AS $alias" : ''; 1339 $join .= " ON ( $this->primary_table.$this->primary_id_column = $alias.$this->meta_id_column )"; 1346 1340 } 1347 1341 … … 1470 1464 } 1471 1465 1466 /** 1467 * Filter the table alias identified as compatible with the current clause. 1468 * 1469 * @since 4.1.0 1470 * 1471 * @param string|bool $alias Table alias, or false if none was found. 1472 * @param array $clause First-order query clause. 1473 * @param array $parent_query Parent of $clause. 1474 * @param object $this WP_Meta_Query object. 1475 */ 1472 1476 return apply_filters( 'meta_query_find_compatible_table_alias', $alias, $clause, $parent_query, $this ) ; 1473 1477 }
Note: See TracChangeset
for help on using the changeset viewer.