WP HOOKS
akcjaod 2.9.0

set_user_role

Args 3Plik wp-includes/class-wp-user.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Fires after the user's role has changed.

Parametry

ParametrTypOpis
$user_idintThe user ID.
$rolestringThe new role.
$old_rolesstring[]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
}

Popularne w tej kategorii