| | 351 | * Translates and retrieves the singular or plural form based on the supplied number |
| | 352 | * and escapes it for safe use in HTML output. |
| | 353 | * |
| | 354 | * @since 4.7.0 |
| | 355 | * |
| | 356 | * @param string $single The text to be used if the number is singular. |
| | 357 | * @param string $plural The text to be used if the number is plural. |
| | 358 | * @param int $number The number to compare against to use either the singular or plural form. |
| | 359 | * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings. |
| | 360 | * Default 'default'. |
| | 361 | * |
| | 362 | * @return string Translated text. |
| | 363 | */ |
| | 364 | function esc_html_n( $single, $plural, $number, $domain = 'default' ) { |
| | 365 | return esc_html( _n( $single, $plural, $number, $domain ) ); |
| | 366 | } |
| | 367 | |
| | 368 | /** |
| | 369 | * Translates and retrieves the singular or plural form based on the supplied number |
| | 370 | * and escapes it for safe use in an attribute. |
| | 371 | * |
| | 372 | * @since 4.7.0 |
| | 373 | * |
| | 374 | * @param string $single The text to be used if the number is singular. |
| | 375 | * @param string $plural The text to be used if the number is plural. |
| | 376 | * @param int $number The number to compare against to use either the singular or plural form. |
| | 377 | * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings. |
| | 378 | * Default 'default'. |
| | 379 | * |
| | 380 | * @return string Translated text. |
| | 381 | */ |
| | 382 | function esc_attr_n( $single, $plural, $number, $domain = 'default' ) { |
| | 383 | return esc_attr( _n( $single, $plural, $number, $domain ) ); |
| | 384 | } |
| | 385 | |
| | 386 | /** |