Changeset 16286
- Timestamp:
- 11/11/2010 10:06:05 AM (14 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/meta.php
r16266 r16286 370 370 * @param string $primary_table 371 371 * @param string $primary_id_column 372 * @param object $context (optional) The main query object 372 373 * @return array( 'join' => $join_sql, 'where' => $where_sql ) 373 374 */ 374 function get_meta_sql( $meta_query, $meta_type, $primary_table, $primary_id_column ) {375 function get_meta_sql( $meta_query, $meta_type, $primary_table, $primary_id_column, $context = null ) { 375 376 global $wpdb; 376 377 … … 441 442 } 442 443 443 return apply_filters ( 'get_meta_sql', compact( 'join', 'where' ), $meta_query, $meta_type, $primary_table, $primary_id_column);444 return apply_filters_ref_array( 'get_meta_sql', array( compact( 'join', 'where' ), $meta_query, $meta_type, $primary_table, $primary_id_column, &$context ) ); 444 445 } 445 446 -
trunk/wp-includes/query.php
r16276 r16286 2148 2148 2149 2149 if ( !empty( $q['meta_query'] ) ) { 2150 $clauses = get_meta_sql( $q['meta_query'], 'post', $wpdb->posts, 'ID');2150 $clauses = call_user_func_array( 'get_meta_sql', array( $q['meta_query'], 'post', $wpdb->posts, 'ID', &$this) ); 2151 2151 $join .= $clauses['join']; 2152 2152 $where .= $clauses['where']; -
trunk/wp-includes/user.php
r16266 r16286 482 482 483 483 if ( !empty( $qv['meta_query'] ) ) { 484 $clauses = get_meta_sql( $qv['meta_query'], 'user', $wpdb->users, 'ID');484 $clauses = call_user_func_array( 'get_meta_sql', array( $qv['meta_query'], 'user', $wpdb->users, 'ID', &$this ) ); 485 485 $this->query_from .= $clauses['join']; 486 486 $this->query_where .= $clauses['where'];
Note: See TracChangeset
for help on using the changeset viewer.