Make WordPress Core


Ignore:
Timestamp:
06/22/2023 12:30:41 AM (2 years ago)
Author:
joedolson
Message:

Administration: Hide password in options/writing.

Hide the password for the "Post via e-mail" settings in writing options. Use the same password hiding mechanisms in use elsewhere in core.

Props mastrup, denis-de-bernardy, ryan, brookedot, wojtek.szkutnik, dd32, sabreuse, sergeybiryukov, costdev, peterwilsoncc, zgrkaralar, clorith, renyot, sabernhardt, boniu91, ironprogrammer, bgoewert.
Fixes #9883.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-writing.php

    r55904 r55974  
    5454    '<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
    5555);
     56
     57wp_enqueue_script( 'user-profile' );
    5658
    5759require_once ABSPATH . 'wp-admin/admin-header.php';
     
    169171<td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option( 'mailserver_login' ); ?>" class="regular-text ltr" /></td>
    170172</tr>
    171 <tr>
    172 <th scope="row"><label for="mailserver_pass"><?php _e( 'Password' ); ?></label></th>
    173 <td>
    174 <input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option( 'mailserver_pass' ); ?>" class="regular-text ltr" />
    175 </td>
     173<tr class="mailserver-pass-wrap">
     174    <th scope="row">
     175        <label for="mailserver_pass">
     176            <?php _e( 'Password' ); ?>
     177        </label>
     178    </th>
     179    <td>
     180        <input type="hidden" value=" " /><!-- #24364 workaround -->
     181        <span class="wp-pwd">
     182            <input type="text" name="mailserver_pass" id="mailserver_pass" class="regular-text ltr" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( get_option( 'mailserver_pass' ) ); ?>" />
     183            <button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" data-start-masked="1" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
     184                <span class="dashicons dashicons-visibility" aria-hidden="true"></span>
     185            </button>
     186        </span>
     187    </td>
    176188</tr>
    177189<tr>
Note: See TracChangeset for help on using the changeset viewer.