WP HOOKS
filtrod 6.3.0

pre_load_textdomain

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

Opis — z kodu źródłowego

Filters whether to short-circuit loading .mo file.

Returning a non-null value from the filter will effectively short-circuit the loading, returning the passed value instead.

Parametry

ParametrTypOpis
$loadedbool | nullThe result of loading a .mo file. Default null.
$domainstringText domain. Unique identifier for retrieving translated strings.
$mofilestringPath to the MO file.
$localestring | nullLocale.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_load_textdomain', 'twoja_funkcja', 10, 4 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
	// Twój kod
}

Popularne w tej kategorii