Make WordPress Core

Ticket #41636: For__41636___Disable_LastPass_prompts_for_Customizer_s__password__type_fields.patch

File For__41636___Disable_LastPass_prompts_for_Customizer_s__password__type_fields.patch, 1.1 KB (added by cliffpaulick, 7 years ago)

Disable LastPass prompts for Customizer's 'password' field types

  • wp-includes/class-wp-customize-control.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    435435         * @return string Data link parameter, if $setting_key is a valid setting, empty string otherwise.
    436436         */
    437437        public function get_link( $setting_key = 'default' ) {
    438                 if ( ! isset( $this->settings[ $setting_key ] ) )
     438                if ( ! isset( $this->settings[$setting_key] ) ) {
    439439                        return '';
     440                }
    440441
    441                 return 'data-customize-setting-link="' . esc_attr( $this->settings[ $setting_key ]->id ) . '"';
     442                $output = 'data-customize-setting-link="' . esc_attr( $this->settings[$setting_key]->id ) . '"';
     443
     444                /**
     445                 * Avoid LastPass saving prompts for Password field types (e.g. API Key field option)
     446                 *
     447                 * @link https://lastpass.com/support.php?cmd=showfaq&id=10512
     448                 */
     449                if ( 'password' == $this->type ) {
     450                        $output .= ' data-lpignore="true"';
     451                }
     452
     453                return $output;
    442454        }
    443455
    444456        /**