Make WordPress Core


Ignore:
Timestamp:
11/01/2010 08:34:54 PM (14 years ago)
Author:
scribu
Message:

Just pass meta type to get_meta_sql(). See #15032

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-object-query.php

    r16142 r16143  
    8888     *      Default: 'CHAR'
    8989     *
     90     * @param string $meta_type
    9091     * @param string $primary_table
    9192     * @param string $primary_id_column
    92      * @param string $meta_table
    93      * @param string $meta_id_column
    9493     * @return array( $join_sql, $where_sql )
    9594     */
    96     function get_meta_sql( $meta_query, $primary_table, $primary_id_column, $meta_table, $meta_id_column ) {
     95    function get_meta_sql( $meta_query, $meta_type, $primary_table, $primary_id_column ) {
    9796        global $wpdb;
     97
     98        if ( ! $meta_table = _get_meta_table( $meta_type ) )
     99            return false;
     100
     101        $meta_id_column = esc_sql( $meta_type . '_id' );
    98102
    99103        $clauses = array();
     
    158162        }
    159163
    160         return apply_filters( 'get_meta_sql', compact( 'join', 'where' ), $meta_query, $primary_table, $primary_id_column, $meta_table, $meta_id_column );
     164        return apply_filters( 'get_meta_sql', compact( 'join', 'where' ), $meta_query, $meta_type, $primary_table, $primary_id_column );
    161165    }
    162166
Note: See TracChangeset for help on using the changeset viewer.