filtrreferencjaod 3.0.0
posts_search
Opis — z kodu źródłowego
Filters the search SQL that is used in the WHERE clause of WP_Query.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$search | string | Search SQL for WHERE clause. |
$query | \WP_Query | The 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
}
// rejestracja funkcji zwrotnej
add_filter( 'posts_search', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii