WP HOOKS
filtrdynamicznyod 5.5.0

ngettext_{$domain}

Args 5Plik wp-includes/l10n.php

Opis — z kodu źródłowego

Filters the singular or plural form of a string for a domain.

The dynamic portion of the hook name, $domain, refers to the text domain.

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_{$domain}', 'twoja_funkcja', 10, 5 );

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

Popularne w tej kategorii