Reference › Functions get_meta_sql ( array $meta_query , string $type , string $primary_table , string $primary_id_column , object $context = null ): string[] | false
Since 3.2.0
Source wp-includes/meta.php:1274Parameters Return Uses Source History Given a meta query, generates SQL clauses to be appended to a main query.
See also WP_Meta_Query Core class used to implement meta queries for the Meta API. Parameters
$meta_queryarray A meta query.
$typestring Type of meta.
$primary_tablestring Primary database table name.
$primary_id_columnstring Primary ID column name.
$contextobject optional The main query object. Default null.Default: null Return string[] | falseArray containing JOIN and WHERE SQL clauses to append to the main query, or false if no table exists for the requested meta type. Source View on Trac ↗ View on GitHub ↗
1274 function get_meta_sql ( $meta_query , $type , $primary_table , $primary_id_column , $context = null ) { 1275 $meta_query_obj = new WP_Meta_Query ( $meta_query ) ; 1276 return $meta_query_obj -> get_sql ( $type , $primary_table , $primary_id_column , $context ) ; 1277 } History Introduced in 3.2.0 . Unchanged from 6.7.7 through 7.1.0.
6.7.7 6.8.8 6.9.7 7.0.4 7.1.0 Signature, return type and hooks compared across 5 parsed releases.
About this page Parsed data Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/meta.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. Corrections Something wrong on this page? Report it and it gets fixed in the next regeneration.