WordPress.org

Make WordPress Core

Opened 11 days ago

Last modified 10 days ago

#49182 new enhancement

Unmask password button

Reported by: bernardroux Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 2.7
Component: Posts, Post Types Keywords: needs-patch good-first-bug
Focuses: Cc:
PR Number:

Description

Hello,
I would like to add an “eye” (connection protected pagefile) of visibility of the Password because many people without a numeric keypad Keyboard believe entering numbers while entering lowercase type [in French : é ”' (-è_çà] the fact that only * appear when connecting to protected pages (protected page file)
Regards

Change History (3)

#1 follow-up: @johnbillion
10 days ago

  • Component changed from General to Posts, Post Types
  • Keywords needs-patch good-first-bug added
  • Version changed from 5.3.2 to 2.7

This functionality exists in a few places within the WordPress admin area. It should be possible to add it to the password protected post form too.

#2 in reply to: ↑ 1 @apieschel
10 days ago

Replying to johnbillion:

This functionality exists in a few places within the WordPress admin area. It should be possible to add it to the password protected post form too.

I've been looking into a patch, and adding the markup to get_the_password_form() in wp-includes/post-template.php looks to be relatively straightforward. However, it doesn't seem right to load the same Javascript functionality as is loaded for the admin views, such as the bindToggleButton() function in wp-admin/js/user-profile.js, since this will be for a front end post view.

For something like this, does it make sense to create a new script file in wp-includes/js/ ?

If the markup for the admin functionality is emulated, there's also the issue of dashicons not being enqueued by default on the front end (unless I'm mistaken), and whether or not we would want to add some default styling of the password toggle button similar to the admin style, as well.

Last edited 10 days ago by apieschel (previous) (diff)

#3 @bernardroux
10 days ago

At @johnbillion and @apieschel.
Thank you for your quick responses.
"For something like this, does it make sense to create a new script file in wp-includes/js/"
I think this suggestion is a good idea.
Note: I am not a champion of JS scripts at all and and it would be better to have the file in its entirety.
Thanks you anywhere

Note: See TracTickets for help on using tickets.