A WordPress-centric search engine for devs and theme authors



_nc ›

Since2.7.0
Deprecated2.9.0
_nc ( $single, $plural, $number, $domain = 'default' )
Parameters: (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
    Default: 'default'
See:
Returns:
  • (string) The translated singular or plural form.
Defined at:
Codex:

Legacy version of _n(), which supports contexts.

Strips everything from the translation after the last bar.



Related Functions: _n, _c, _nx, _

Source

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