[wp-trac] [WordPress Trac] #60668: Missing translation in login_header() first parameter

WordPress Trac noreply at wordpress.org
Wed Oct 8 13:08:14 UTC 2025


#60668: Missing translation in login_header() first parameter
---------------------------------------------+-----------------------
 Reporter:  juliobox                         |       Owner:  audrasjb
     Type:  enhancement                      |      Status:  closed
 Priority:  normal                           |   Milestone:  6.6
Component:  Login and Registration           |     Version:  2.1
 Severity:  minor                            |  Resolution:  fixed
 Keywords:  good-first-bug has-patch commit  |     Focuses:
---------------------------------------------+-----------------------

Comment (by devmooz):

 Hey there,

 Thanks for explaining this so well! I agree that removing the default
 value completely could cause backward compatibility issues with plugins
 relying on it.

 Using the first option seems safer:


 {{{
 function login_header( $title = 'Log In', $message = '', $wp_error = null
 ) {
     if ( 'Log In' === $title ) {
         $title = __( 'Log In' );
     }
 }
 }}}



 It keeps compatibility intact while ensuring the string remains
 translatable.
 Using null as the default could potentially break existing plugins, so
 this approach feels more stable and practical.

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


More information about the wp-trac mailing list