This function has been deprecated. Use _nx() instead.
_nc( string $single, string $plural, int $number, string $domain = 'default' )
Legacy version of _n(), which supports contexts.
Description
Strips everything from the translation after the last bar.
See also
Parameters
- $single
-
(Required) The text to be used if the number is singular.
- $plural
-
(Required) The text to be used if the number is plural.
- $number
-
(Required) The number to compare against to use either the singular or plural form.
- $domain
-
(Optional) Text domain. Unique identifier for retrieving translated strings.<br> Default 'default'.
Default value: 'default'
Return
(string) The translated singular or plural form.
Source
File: wp-includes/deprecated.php
function _nc( $single, $plural, $number, $domain = 'default' ) {
_deprecated_function( __FUNCTION__, 'WP-2.9.0', '_nx()' );
return before_last_bar( _n( $single, $plural, $number, $domain ) );
}
Changelog
Version | Description |
---|---|
3.0.0 | Use _nx() |
2.7.0 | Introduced. This function has been deprecated. Use _nx() instead. |