mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
get_meta_sql should be private. see #14645.
git-svn-id: https://develop.svn.wordpress.org/trunk@17170 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
432bd4bdae
commit
68692f0565
@ -356,6 +356,7 @@ function update_meta_cache($meta_type, $object_ids) {
|
||||
* Given a meta query, generates SQL clauses to be appended to a main query
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @access private
|
||||
*
|
||||
* @param array $meta_query List of metadata queries. A single query is an associative array:
|
||||
* - 'key' string The meta key
|
||||
@ -373,7 +374,7 @@ function update_meta_cache($meta_type, $object_ids) {
|
||||
* @param object $context (optional) The main query object
|
||||
* @return array( 'join' => $join_sql, 'where' => $where_sql )
|
||||
*/
|
||||
function get_meta_sql( $meta_query, $meta_type, $primary_table, $primary_id_column, $context = null ) {
|
||||
function _get_meta_sql( $meta_query, $meta_type, $primary_table, $primary_id_column, $context = null ) {
|
||||
global $wpdb;
|
||||
|
||||
if ( ! $meta_table = _get_meta_table( $meta_type ) )
|
||||
|
@ -2347,7 +2347,7 @@ class WP_Query {
|
||||
}
|
||||
|
||||
if ( !empty( $q['meta_query'] ) ) {
|
||||
$clauses = call_user_func_array( 'get_meta_sql', array( $q['meta_query'], 'post', $wpdb->posts, 'ID', &$this) );
|
||||
$clauses = call_user_func_array( '_get_meta_sql', array( $q['meta_query'], 'post', $wpdb->posts, 'ID', &$this) );
|
||||
$join .= $clauses['join'];
|
||||
$where .= $clauses['where'];
|
||||
}
|
||||
|
@ -508,7 +508,7 @@ class WP_User_Query {
|
||||
}
|
||||
|
||||
if ( !empty( $qv['meta_query'] ) ) {
|
||||
$clauses = call_user_func_array( 'get_meta_sql', array( $qv['meta_query'], 'user', $wpdb->users, 'ID', &$this ) );
|
||||
$clauses = call_user_func_array( '_get_meta_sql', array( $qv['meta_query'], 'user', $wpdb->users, 'ID', &$this ) );
|
||||
$this->query_from .= $clauses['join'];
|
||||
$this->query_where .= $clauses['where'];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user