filtrreferencjaod 3.1.0
get_meta_sql
Opis — z kodu źródłowego
Filters the meta query's generated SQL.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$sql | string[] | Array containing the query's JOIN and WHERE clauses. |
$queries | array | Array of meta queries. |
$type | string | Type of meta. Possible values include but are not limited to 'post', 'comment', 'blog', 'term', and 'user'. |
$primary_table | string | Primary table. |
$primary_id_column | string | Primary column ID. |
$context | object | The main query object that corresponds to the type, for example a <code>WP_Query</code>, <code>WP_User_Query</code>, or <code>WP_Site_Query</code>. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'get_meta_sql', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'get_meta_sql', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii