[wp-trac] [WordPress Trac] #37057: Creation of an esc_html functions for _n(), _nx(), _ex(), and number_format_i18n()

WordPress Trac noreply at wordpress.org
Thu Aug 5 08:05:13 UTC 2021


#37057: Creation of an esc_html functions for _n(), _nx(), _ex(), and
number_format_i18n()
-----------------------------+------------------------------
 Reporter:  zakkath          |       Owner:  (none)
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  I18N             |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |     Focuses:
-----------------------------+------------------------------

Comment (by gonssal):

 This would be nice to have.

 Simplified use case for {{{_n()}}}. Imagine I have an array of user names
 I want to list. I want the list to have a translatable heading specifying
 what the names are about:

 {{{#!php
 esc_html_n( 'User:', 'Users:', count( $users ), 'textdomain' );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/37057#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list