[wp-trac] [WordPress Trac] #55260: Update Codex Page to Include Password Visibility Button and Language Switcher

WordPress Trac noreply at wordpress.org
Fri Feb 25 16:43:24 UTC 2022


#55260: Update Codex Page to Include Password Visibility Button and Language
Switcher
-------------------------+-------------------------------------------------
 Reporter:  generosus    |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Login and    |    Version:  5.9.1
  Registration           |   Keywords:  dev-feedback 2nd-opinion needs-
 Severity:  normal       |  codex needs-docs
  Focuses:               |
-------------------------+-------------------------------------------------
 The Codex page, [https://codex.wordpress.org/Customizing_the_Login_Form
 /Customizing the Login Form], needs to be updated to include the
 [https://ibb.co/1dZ23W1 /login form password visibility button and the
 language switcher].

 To assist, the following can be added to the updated page for the benefit
 of all WordPress users:

 **Code to Disable the Password Visibility Button:**


 {{{
 function remove_wp_hide_pw_button() {

 ?><script>
         if ((document.addEventListener != null) && (document.querySelector
 != null)) {
     document.addEventListener( 'DOMContentLoaded', function() {
         var b = document.querySelector('button.wp-hide-pw');
         if (b != null) b.remove();
     });
 }
 </script>
 <?php
 }

 add_action('login_footer', 'remove_wp_hide_pw_button');
 }}}

 **Filter to Disable the Language Switcher:**

 {{{
 add_filter( 'login_display_language_dropdown', '__return_false' );
 }}}

 **Useful:**

 (1) Above codes can be implemented using the plugin,
 [https://wordpress.org/plugins/code-snippets/ /Code Snippets].
 (2) Above codes have been thoroughly tested and work as intended.
 (3) No security issues detected when using the above codes.

 Thank you!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55260>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list