Opened 3 years ago
#55260 new enhancement
Update Codex Page to Include Password Visibility Button and Language Switcher
Reported by: | generosus | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.9.1 |
Component: | Login and Registration | Keywords: | dev-feedback 2nd-opinion needs-codex needs-docs |
Focuses: | Cc: |
Description
The Codex page, /Customizing the Login Form, needs to be updated to include the /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, /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!
Note: See
TracTickets for help on using
tickets.