wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



_nc › WordPress Function

Desde2.7.0
Obsoleto2.9.0
_nc ( $single, $plural, $number, $domain = 'default' )
Parâmetros: (4)
  • (string) $single The text to be used if the number is singular.
    Required: Yes
  • (string) $plural The text to be used if the number is plural.
    Required: Yes
  • (int) $number The number to compare against to use either the singular or plural form.
    Required: Yes
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Required: No
    Padrão: 'default'
Ver:
Retorna:
  • (string) The translated singular or plural form.
Definido em:
Codex:

Legacy version of _n(), which supports contexts.

Strips everything from the translation after the last bar.


Funções relacionadas: _n, _c, _nx, _

Fonte

function _nc( $single, $plural, $number, $domain = 'default' ) {
	_deprecated_function( __FUNCTION__, '2.9.0', '_nx()' );
	return before_last_bar( _n( $single, $plural, $number, $domain ) );
}