filtrod 2.2.0
ngettext
Opis — z kodu źródłowego
Filters the singular or plural form of a string.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$translation | string | Translated text. |
$single | string | The text to be used if the number is singular. |
$plural | string | The text to be used if the number is plural. |
$number | int | The number to compare against to use either the singular or plural form. |
$domain | string | Text 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
}
// 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