WP HOOKS
filtrreferencjaod 3.1.0

get_meta_sql

Args 1Plik wp-includes/class-wp-meta-query.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the meta query's generated SQL.

Parametry

ParametrTypOpis
$sqlstring[]Array containing the query's JOIN and WHERE clauses.
$queriesarrayArray of meta queries.
$typestringType of meta. Possible values include but are not limited to 'post', 'comment', 'blog', 'term', and 'user'.
$primary_tablestringPrimary table.
$primary_id_columnstringPrimary column ID.
$contextobjectThe 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
}

Popularne w tej kategorii