filtrod 4.6.0
site_search_columns
Opis — z kodu źródłowego
Filters the columns to search in a WP_Site_Query search.
The default columns include 'domain' and 'path.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$search_columns | string[] | Array of column names to be searched. |
$search | string | Text being searched. |
$query | \WP_Site_Query | The current WP_Site_Query instance. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'site_search_columns', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'site_search_columns', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii