WP HOOKS
filtrod 2.2.0

ngettext

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

Opis — z kodu źródłowego

Filters the singular or plural form of a string.

Parametry

ParametrTypOpis
$translationstringTranslated text.
$singlestringThe text to be used if the number is singular.
$pluralstringThe text to be used if the number is plural.
$numberintThe number to compare against to use either the singular or plural form.
$domainstringText domain. Unique identifier for retrieving translated strings.

Wywołanie

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

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

Popularne w tej kategorii