[wp-trac] [WordPress Trac] #35449: Add ability to filter back to blog link on login page

WordPress Trac noreply at wordpress.org
Thu Jan 14 20:48:27 UTC 2021


#35449: Add ability to filter back to blog link on login page
---------------------------------------+------------------------------
 Reporter:  ebinnion                   |       Owner:  adamsilverstein
     Type:  enhancement                |      Status:  assigned
 Priority:  normal                     |   Milestone:  5.7
Component:  Login and Registration     |     Version:
 Severity:  normal                     |  Resolution:
 Keywords:  has-patch has-screenshots  |     Focuses:
---------------------------------------+------------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch dev-feedback has-screenshots => has-patch has-
     screenshots


Comment:

 Tested. Works for me ✅

 Used this testing code:
 {{{#!php
 <?php
 add_filter(
         'login_site_html_link',
         function () {
                 return sprintf(
                         '<a href="%s">%s</a>',
                         esc_url( home_url( '/' ) ),
                         /* translators: %s: Site title. */
                         esc_html_x( '← Back to home', 'site' )
                 );
         }
 );
 }}}


 @audrasjb the patch escapes the URL, but not the translated string.

 {{{#!php
 <?php
 _x( '← Go to %s', 'site' )
 }}}

 Shouldn't this be changed to?

 {{{#!php
 <?php
 esc_html_x( '← Go to %s', 'site' )
 }}}

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


More information about the wp-trac mailing list