WP HOOKS
filtrod 5.0.2

pre_load_script_translations

Args 4Plik wp-includes/l10n.phpDokumentacja WP ↗

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

ParametrTypOpis
$translationsstring | false | nullJSON-encoded translation data. Default null.
$filestring | falsePath to the translation file to load. False if there isn't one.
$handlestringName of the script to register a translation domain to.
$domainstringThe 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
}

Popularne w tej kategorii