filtrod 5.0.0
pre_determine_locale
Opis — z kodu źródłowego
Filters the locale for the current request prior to the default determination process.
Using this filter allows to override the default logic, effectively short-circuiting the function.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$locale | string | null | The locale to return and short-circuit. Default null. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'pre_determine_locale', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'pre_determine_locale', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii