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. Built from https://develop.svn.wordpress.org/trunk@55974 git-svn-id: http://core.svn.wordpress.org/trunk@55486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fe6a2cc7d9
commit
2d7dafe2b8
|
@ -552,6 +552,54 @@ fieldset label,
|
||||||
|
|
||||||
.wp-pwd {
|
.wp-pwd {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailserver-pass-wrap .wp-pwd {
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* rtl:ignore */
|
||||||
|
#mailserver_pass {
|
||||||
|
direction: ltr;
|
||||||
|
padding-right: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* rtl:ignore */
|
||||||
|
.mailserver-pass-wrap .button.wp-hide-pw {
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 2;
|
||||||
|
width: 2.5rem;
|
||||||
|
min-width: 40px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 9px;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailserver-pass-wrap .button.wp-hide-pw:hover {
|
||||||
|
background: transparent;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailserver-pass-wrap .button.wp-hide-pw:focus {
|
||||||
|
background: transparent;
|
||||||
|
border-color: #3582c4;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 0 0 1px #3582c4;
|
||||||
|
/* Only visible in Windows High Contrast mode */
|
||||||
|
outline: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailserver-pass-wrap .button.wp-hide-pw:active {
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#misc-publishing-actions label {
|
#misc-publishing-actions label {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -551,6 +551,54 @@ fieldset label,
|
||||||
|
|
||||||
.wp-pwd {
|
.wp-pwd {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailserver-pass-wrap .wp-pwd {
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* rtl:ignore */
|
||||||
|
#mailserver_pass {
|
||||||
|
direction: ltr;
|
||||||
|
padding-right: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* rtl:ignore */
|
||||||
|
.mailserver-pass-wrap .button.wp-hide-pw {
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 2;
|
||||||
|
width: 2.5rem;
|
||||||
|
min-width: 40px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 9px;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailserver-pass-wrap .button.wp-hide-pw:hover {
|
||||||
|
background: transparent;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailserver-pass-wrap .button.wp-hide-pw:focus {
|
||||||
|
background: transparent;
|
||||||
|
border-color: #3582c4;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 0 0 1px #3582c4;
|
||||||
|
/* Only visible in Windows High Contrast mode */
|
||||||
|
outline: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailserver-pass-wrap .button.wp-hide-pw:active {
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#misc-publishing-actions label {
|
#misc-publishing-actions label {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -52,7 +52,9 @@
|
||||||
$( '#pw-weak-text-label' ).text( __( 'Confirm use of weak password' ) );
|
$( '#pw-weak-text-label' ).text( __( 'Confirm use of weak password' ) );
|
||||||
|
|
||||||
// Focus the password field.
|
// Focus the password field.
|
||||||
$( $pass1 ).trigger( 'focus' );
|
if ( 'mailserver_pass' !== $pass1.prop('id' ) ) {
|
||||||
|
$( $pass1 ).trigger( 'focus' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function bindPass1() {
|
function bindPass1() {
|
||||||
|
@ -171,7 +173,7 @@
|
||||||
var $generateButton,
|
var $generateButton,
|
||||||
$cancelButton;
|
$cancelButton;
|
||||||
|
|
||||||
$pass1Row = $( '.user-pass1-wrap, .user-pass-wrap, .reset-pass-submit' );
|
$pass1Row = $( '.user-pass1-wrap, .user-pass-wrap, .mailserver-pass-wrap, .reset-pass-submit' );
|
||||||
|
|
||||||
// Hide the confirm password field when JavaScript support is enabled.
|
// Hide the confirm password field when JavaScript support is enabled.
|
||||||
$('.user-pass2-wrap').hide();
|
$('.user-pass2-wrap').hide();
|
||||||
|
@ -188,7 +190,7 @@
|
||||||
$submitButtons.prop( 'disabled', ! $weakCheckbox.prop( 'checked' ) );
|
$submitButtons.prop( 'disabled', ! $weakCheckbox.prop( 'checked' ) );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
$pass1 = $('#pass1');
|
$pass1 = $('#pass1, #mailserver_pass');
|
||||||
if ( $pass1.length ) {
|
if ( $pass1.length ) {
|
||||||
bindPass1();
|
bindPass1();
|
||||||
} else {
|
} else {
|
||||||
|
@ -314,23 +316,27 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOrHideWeakPasswordCheckbox() {
|
function showOrHideWeakPasswordCheckbox() {
|
||||||
var passStrength = $('#pass-strength-result')[0];
|
var passStrengthResult = $('#pass-strength-result');
|
||||||
|
|
||||||
if ( passStrength.className ) {
|
if ( passStrengthResult.length ) {
|
||||||
$pass1.addClass( passStrength.className );
|
var passStrength = passStrengthResult[0];
|
||||||
if ( $( passStrength ).is( '.short, .bad' ) ) {
|
|
||||||
if ( ! $weakCheckbox.prop( 'checked' ) ) {
|
if ( passStrength.className ) {
|
||||||
$submitButtons.prop( 'disabled', true );
|
$pass1.addClass( passStrength.className );
|
||||||
}
|
if ( $( passStrength ).is( '.short, .bad' ) ) {
|
||||||
$weakRow.show();
|
if ( ! $weakCheckbox.prop( 'checked' ) ) {
|
||||||
} else {
|
$submitButtons.prop( 'disabled', true );
|
||||||
if ( $( passStrength ).is( '.empty' ) ) {
|
}
|
||||||
$submitButtons.prop( 'disabled', true );
|
$weakRow.show();
|
||||||
$weakCheckbox.prop( 'checked', false );
|
|
||||||
} else {
|
} else {
|
||||||
$submitButtons.prop( 'disabled', false );
|
if ( $( passStrength ).is( '.empty' ) ) {
|
||||||
|
$submitButtons.prop( 'disabled', true );
|
||||||
|
$weakCheckbox.prop( 'checked', false );
|
||||||
|
} else {
|
||||||
|
$submitButtons.prop( 'disabled', false );
|
||||||
|
}
|
||||||
|
$weakRow.hide();
|
||||||
}
|
}
|
||||||
$weakRow.hide();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -54,6 +54,8 @@ get_current_screen()->set_help_sidebar(
|
||||||
'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
|
'<p>' . __( '<a href="https://wordpress.org/support/forums/">Support forums</a>' ) . '</p>'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
wp_enqueue_script( 'user-profile' );
|
||||||
|
|
||||||
require_once ABSPATH . 'wp-admin/admin-header.php';
|
require_once ABSPATH . 'wp-admin/admin-header.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -168,11 +170,21 @@ if ( apply_filters( 'enable_post_by_email_configuration', true ) ) {
|
||||||
<th scope="row"><label for="mailserver_login"><?php _e( 'Login Name' ); ?></label></th>
|
<th scope="row"><label for="mailserver_login"><?php _e( 'Login Name' ); ?></label></th>
|
||||||
<td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option( 'mailserver_login' ); ?>" class="regular-text ltr" /></td>
|
<td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option( 'mailserver_login' ); ?>" class="regular-text ltr" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr class="mailserver-pass-wrap">
|
||||||
<th scope="row"><label for="mailserver_pass"><?php _e( 'Password' ); ?></label></th>
|
<th scope="row">
|
||||||
<td>
|
<label for="mailserver_pass">
|
||||||
<input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option( 'mailserver_pass' ); ?>" class="regular-text ltr" />
|
<?php _e( 'Password' ); ?>
|
||||||
</td>
|
</label>
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<input type="hidden" value=" " /><!-- #24364 workaround -->
|
||||||
|
<span class="wp-pwd">
|
||||||
|
<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' ) ); ?>" />
|
||||||
|
<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' ); ?>">
|
||||||
|
<span class="dashicons dashicons-visibility" aria-hidden="true"></span>
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="default_email_category"><?php _e( 'Default Mail Category' ); ?></label></th>
|
<th scope="row"><label for="default_email_category"><?php _e( 'Default Mail Category' ); ?></label></th>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.3-alpha-55973';
|
$wp_version = '6.3-alpha-55974';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue