filtrod 5.0.2
pre_load_script_translations
Opis — z kodu źródłowego
Pre-filters script translations for the given file, script handle and text domain.
Returning a non-null value allows to override the default logic, effectively short-circuiting the function.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$translations | string | false | null | JSON-encoded translation data. Default null. |
$file | string | false | Path to the translation file to load. False if there isn't one. |
$handle | string | Name of the script to register a translation domain to. |
$domain | string | The text domain. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_load_script_translations', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_load_script_translations', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii