[wp-trac] [WordPress Trac] #54127: Twenty Twenty-One: Missing esc_html__() in functions.php (was: Missing esc_html__() in Twenty Twenty One functions.php)

WordPress Trac noreply at wordpress.org
Wed Sep 15 14:24:32 UTC 2021


#54127: Twenty Twenty-One: Missing esc_html__() in functions.php
---------------------------+-------------------------------
 Reporter:  teucrium       |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:  5.8.1
 Severity:  minor          |  Resolution:
 Keywords:  has-patch      |     Focuses:  coding-standards
---------------------------+-------------------------------
Changes (by SergeyBiryukov):

 * component:  Themes => Bundled Theme


Old description:

> The escaping function **esc_html__()**  is missing in Twenty Twenty One
> functions.php, line 77:
> {{{#!php
> register_nav_menus(
>         array(
>         'primary' => esc_html__( 'Primary menu', 'twentytwentyone' ),
>         'footer'  => __( 'Secondary menu', 'twentytwentyone' ),
>         )
> );
> }}}
>
> We should find:
> {{{
> 'footer'  => esc_html__( 'Secondary menu', 'twentytwentyone' ),
> }}}
>  instead of:
> {{{
> 'footer'  => __( 'Secondary menu', 'twentytwentyone' ),
> }}}

New description:

 The escaping function `esc_html__()`  is missing in Twenty Twenty One
 functions.php, line 77:
 {{{#!php
 register_nav_menus(
         array(
         'primary' => esc_html__( 'Primary menu', 'twentytwentyone' ),
         'footer'  => __( 'Secondary menu', 'twentytwentyone' ),
         )
 );
 }}}

 We should find:
 {{{
 'footer'  => esc_html__( 'Secondary menu', 'twentytwentyone' ),
 }}}
  instead of:
 {{{
 'footer'  => __( 'Secondary menu', 'twentytwentyone' ),
 }}}

--

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


More information about the wp-trac mailing list