Add 'get_meta_sql' filter. Props sc0ttkclark for initial patch. Fixes #15018

git-svn-id: https://develop.svn.wordpress.org/trunk@16106 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu 2010-10-31 00:21:06 +00:00
parent 7db59a9a89
commit 2285775e09
1 changed files with 3 additions and 2 deletions

View File

@ -153,10 +153,11 @@ class WP_Object_Query {
$meta_compare_string = '%s';
}
$where .= $wpdb->prepare( " AND CAST($alias.meta_value AS {$meta_type}) {$meta_compare} {$meta_compare_string}", $meta_value );
unset($meta_compare_string);
unset( $meta_compare_string );
}
return compact( 'join', 'where' );
return apply_filters( 'get_meta_sql', compact( 'join', 'where' ), $meta_query, $primary_table, $primary_id_column, $meta_table, $meta_id_column );
}
/*