Make WordPress Core

Ticket #37057: 37057.diff

File 37057.diff, 1.3 KB (added by zakkath, 7 years ago)
  • src/wp-includes/l10n.php

    diff --git a/src/wp-includes/l10n.php b/src/wp-includes/l10n.php
    index a81470ff7d..e0da66c019 100644
    a b function _nx($single, $plural, $number, $context, $domain = 'default') { 
    420420}
    421421
    422422/**
     423 * Translates and retrieves the singular or plural form based on the supplied number, with gettext contextand escapes
     424 * it for safe use in HTML output.
     425 *
     426 * @since 4.8.1
     427 *
     428 * @param string $single  The text to be used if the number is singular.
     429 * @param string $plural  The text to be used if the number is plural.
     430 * @param int    $number  The number to compare against to use either the singular or plural form.
     431 * @param string $context Context information for the translators.
     432 * @param string $domain  Optional. Text domain. Unique identifier for retrieving translated strings.
     433 *                        Default 'default'.
     434 * @return string The translated singular or plural form.
     435 */
     436function esc_html_nx( $single, $plural, $number, $context, $domain = 'default' ) {
     437        return esc_html( _nx( $single, $plural, $number, $context, $domain ) );
     438}
     439
     440/**
    423441 * Registers plural strings in POT file, but does not translate them.
    424442 *
    425443 * Used when you want to keep structures with translatable plural