filtrod 4.4.0
get_role_list
Opis — z kodu źródłowego
Filters the returned array of translated role names for a user.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$role_list | string[] | An array of translated user role names keyed by role. |
$user_object | \WP_User | A WP_User object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_role_list', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_role_list', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii