akcjaod 2.9.0
set_user_role
Opis — z kodu źródłowego
Fires after the user's role has changed.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$user_id | int | The user ID. |
$role | string | The new role. |
$old_roles | string[] | An array of the user's previous roles. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'set_user_role', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'set_user_role', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii