WP HOOKS
filtrreferencjaod 3.0.0

posts_search

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

Opis — z kodu źródłowego

Filters the search SQL that is used in the WHERE clause of WP_Query.

Parametry

ParametrTypOpis
$searchstringSearch SQL for WHERE clause.
$query\WP_QueryThe current WP_Query object.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'posts_search', 'twoja_funkcja' );

function twoja_funkcja($param_1) {
	// Twój kod
}

Popularne w tej kategorii