get_meta_sql ( $meta_query, $type, $primary_table, $primary_id_column, $context = null )

  • (array) meta_query A meta query.
  • (string) type Type of meta.
  • (string) primary_table Primary database table name.
  • (string) primary_id_column Primary ID column name.
  • (object) context Optional. The main query object. Default null.
  • WP_Meta_Query
  • (string[]|false) { Array containing JOIN and WHERE SQL clauses to append to the main query, or false if no table exists for the requested meta type. @type string $join SQL fragment to append to the main JOIN clause. @type string $where SQL fragment to append to the main WHERE clause. }
Defined at:


Given a meta query, generates SQL clauses to be appended to a main query.

Related Functions

get_tax_sql, get_meta_keys, _get_meta_table, get_tags, get_metadata

Top Google Results

User discussions

wpseek mobile