akcjaod 2.7.0
auth_cookie_valid
Opis — z kodu źródłowego
Fires once an authentication cookie has been validated.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$cookie_elements | string[] | { Authentication cookie components. @type string $username User's username. @type string $expiration The time the cookie expires as a UNIX timestamp. @type string $token User's session token used. @type string $hmac The security hash for the cookie. @type string $scheme The cookie scheme to use. } |
$user | \WP_User | User object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'auth_cookie_valid', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'auth_cookie_valid', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii