diff --git a/wp-includes/meta.php b/wp-includes/meta.php index cfbaf20d71..f8ca989845 100644 --- a/wp-includes/meta.php +++ b/wp-includes/meta.php @@ -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 ) ) diff --git a/wp-includes/query.php b/wp-includes/query.php index fd81f2d40b..fbf6d3556c 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -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']; } diff --git a/wp-includes/user.php b/wp-includes/user.php index a13628467a..cd31edb0d4 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -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']; }