Uses
| Uses | Description |
|---|---|
| wp-includes/class-wp-meta-query.php: WP_Meta_Query::__construct() | Constructor. |
Given a meta query, generates SQL clauses to be appended to a main query.
(array) (Required) A meta query.
(string) (Required) Type of meta.
(string) (Required) Primary database table name.
(string) (Required) Primary ID column name.
(object) (Optional) The main query object
Default value: null
(array) Associative array of JOIN and WHERE SQL.
File: wp-includes/meta.php
function get_meta_sql( $meta_query, $type, $primary_table, $primary_id_column, $context = null ) {
$meta_query_obj = new WP_Meta_Query( $meta_query );
return $meta_query_obj->get_sql( $type, $primary_table, $primary_id_column, $context );
} | Version | Description |
|---|---|
| 3.2.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_meta_sql