filtrod 3.6.0
user_search_columns
Opis — z kodu źródłowego
Filters the columns to search in a WP_User_Query search.
The default columns depend on the search term, and include 'ID', 'user_login', 'user_email', 'user_url', 'user_nicename', and 'display_name'.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$search_columns | string[] | Array of column names to be searched. |
$search | string | Text being searched. |
$query | \WP_User_Query | The current WP_User_Query instance. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'user_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( 'user_search_columns', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii