[wp-trac] [WordPress Trac] #41636: Disable LastPass save prompt in Customizer's password fields
WordPress Trac
noreply at wordpress.org
Wed Aug 16 18:32:21 UTC 2017
#41636: Disable LastPass save prompt in Customizer's password fields
--------------------------+------------------------------
Reporter: cliffpaulick | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses: ui
--------------------------+------------------------------
Comment (by westonruter):
@cliffpaulick thanks for the patch. However, for core we'd want to only
include something that is generic. We wouldn't want a LastPass-specific
field. If there is a generic `autocomplete="new-password"` attribute that
could be used instead, which would work with 1Password and Chrome's
builtin password manager, that would be preferred.
In any case, you can disable LastPass specifically on your site for a
given field by using the `input_attrs` array for a control.
For example, in a plugin you could do:
{{{#!php
<?php
add_action( 'customize_register', function( WP_Customize_Manager
$wp_customize ) {
foreach ( $wp_customize->controls() as $control ) {
/** @var WP_Customize_Control $control */
if ( 'password' === $control->type ) {
$control->input_attrs['data-lpignore'] = 'true';
}
}
}, 1000 );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41636#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list