akcjaod 4.7.0
switch_locale
Opis — z kodu źródłowego
Fires when the locale is switched.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$locale | string | The new locale. |
$user_id | false | int | User ID for context if available. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'switch_locale', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'switch_locale', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii