Core Class
View Source on Trac ↗
Core Class
WP_Meta_Query
class WP_Meta_Query
// Constructor: function Object() { [native code] } Core class used to implement meta queries for the Meta API.
Methods 12 methods
| Method / Return | Description |
|---|---|
| __construct() void | Constructor.
Parameters: $meta_query: mixed |
| sanitize_query() array | Ensures the 'meta_query' argument passed to the class constructor is well-formed.
Parameters: $queries: mixed |
| is_first_order_clause() bool | Determines whether a query clause is first-order.
Parameters: $query: mixed |
| parse_query_vars() void | Constructs a meta query based on 'meta_*' query vars
Parameters: $qv: mixed |
| get_cast_for_type() string | Returns the appropriate alias for the given meta type if applicable.
Parameters: $type: mixed |
| get_sql() (string[] | Generates SQL clauses to be appended to a main query.
Parameters: $type: mixed, $primary_table: mixed, $primary_id_column: mixed, $context: mixed |
| get_sql_clauses() string[] | Generates SQL clauses to be appended to a main query. |
| get_sql_for_query() string[] | Generates SQL clauses for a single query array.
Parameters: $query: mixed, $depth: mixed |
| get_sql_for_clause() array | Generates SQL JOIN and WHERE clauses for a first-order query clause.
Parameters: $clause: mixed, $parent_query: mixed, $clause_key: mixed |
| get_clauses() array | Gets a flattened list of sanitized meta clauses. |
| find_compatible_table_alias() (string | Identifies an existing table alias that is compatible with the current
Parameters: $clause: mixed, $parent_query: mixed |
| has_or_relation() bool | Checks whether the current query has any OR relations. |
Properties
| Property / Type | Description |
|---|---|
| $queries mixed public | No description available. |
| $relation mixed public | No description available. |
| $meta_table mixed public | No description available. |
| $meta_id_column mixed public | No description available. |
| $primary_table mixed public | No description available. |
| $primary_id_column mixed public | No description available. |
| $table_aliases mixed public | No description available. |
| $clauses mixed public | No description available. |
| $has_or_relation mixed public | No description available. |
Class Information
Since Version
3.2.0
Source File
wp-includes/class-wp-meta-query.php
Advertisement