-function _nx_noop( $single, $plural, $context ) {
- return array( $single, $plural, $context );
+function _nx_noop( $singular, $plural, $context, $domain = null ) {
+ return array( 0 => $singular, 1 => $plural, 2 => $context, 'singular' => $singular, 'plural' => $plural, 'context' => $context, 'domain' => $domain );
+}
+
+/**
+ * Translate the result of _n_noop() or _nx_noop()
+ *
+ * @since 3.1
+ * @param array $nooped_plural Array with singular, plural and context keys, usually the result of _n_noop() or _nx_noop()
+ * @param int $count Number of objects
+ * @param string $domain Optional. The domain identifier the text should be retrieved in. If $nooped_plural contains
+ * a domain passed to _n_noop() or _nx_noop(), it will override this value.
+ */
+function translate_nooped_plural( $nooped_plural, $count, $domain = 'default' ) {
+ if ( $nooped_plural['domain'] )
+ $domain = $nooped_plural['domain'];
+
+ if ( $nooped_plural['context'] )
+ return _nx( $nooped_plural['singular'], $nooped_plural['plural'], $count, $nooped_plural['context'], $domain );
+ else
+ return _n( $nooped_plural['singular'], $nooped_plural['plural'], $count, $domain );