_n_noop()WP 2.5.0

Registers plural strings in POT file, but does not translate them.

Used when you want to keep structures with translatable plural strings and use them later when the number is known.

Example:

$message = _n_noop( '%s post', '%s posts', 'text-domain' );
...
printf( translate_nooped_plural( $message, $count, 'text-domain' ), number_format_i18n( $count ) );

Внутренняя функция — эта функция рассчитана на использование самим ядром. Не рекомендуется использовать эту функцию в своем коде.

Хуков нет.

Возвращает

Массив. Array of translation information for the strings.

Использование

_n_noop( $singular, $plural, $domain );
$singular(строка) (обязательный)
Singular form to be localized.
$plural(строка) (обязательный)
Plural form to be localized.
$domain(строка)
Text domain. Unique identifier for retrieving translated strings.
По умолчанию: null

Список изменений

С версии 2.5.0 Введена.

Код _n_noop() WP 6.5.2

function _n_noop( $singular, $plural, $domain = null ) {
	return array(
		0          => $singular,
		1          => $plural,
		'singular' => $singular,
		'plural'   => $plural,
		'context'  => null,
		'domain'   => $domain,
	);
}