WordPress.org

Make WordPress Core

Changeset 17530


Ignore:
Timestamp:
03/22/11 20:35:47 (3 years ago)
Author:
ryan
Message:

Avoid var name conflict in _get_meta_sql(). Fixes type var passed to get_meta_sql filter. Props Rahe, nacin. fixes #16825 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/meta.php

    r17170 r17530  
    369369 *      Default: 'CHAR' 
    370370 * 
    371  * @param string $meta_type 
     371 * @param string $type Type of meta 
    372372 * @param string $primary_table 
    373373 * @param string $primary_id_column 
     
    375375 * @return array( 'join' => $join_sql, 'where' => $where_sql ) 
    376376 */ 
    377 function _get_meta_sql( $meta_query, $meta_type, $primary_table, $primary_id_column, $context = null ) { 
    378     global $wpdb; 
    379  
    380     if ( ! $meta_table = _get_meta_table( $meta_type ) ) 
    381         return false; 
    382  
    383     $meta_id_column = esc_sql( $meta_type . '_id' ); 
     377function _get_meta_sql( $meta_query, $type, $primary_table, $primary_id_column, $context = null ) { 
     378    global $wpdb; 
     379 
     380    if ( ! $meta_table = _get_meta_table( $type ) ) 
     381        return false; 
     382 
     383    $meta_id_column = esc_sql( $type . '_id' ); 
    384384 
    385385    $join = ''; 
     
    443443    } 
    444444 
    445     return apply_filters_ref_array( 'get_meta_sql', array( compact( 'join', 'where' ), $meta_query, $meta_type, $primary_table, $primary_id_column, &$context ) ); 
     445    return apply_filters_ref_array( 'get_meta_sql', array( compact( 'join', 'where' ), $meta_query, $type, $primary_table, $primary_id_column, &$context ) ); 
    446446} 
    447447 
Note: See TracChangeset for help on using the changeset viewer.