diff --git src/js/_enqueues/admin/user-profile.js src/js/_enqueues/admin/user-profile.js
index 7fa3064400..ec84a91ef6 100644
|
|
|
|
| 9 | 9 | $pass1Row, |
| 10 | 10 | $pass1Wrap, |
| 11 | 11 | $pass1, |
| 12 | | $pass1Text, |
| 13 | | $pass1Label, |
| 14 | 12 | $pass2, |
| 15 | 13 | $weakRow, |
| 16 | 14 | $weakCheckbox, |
| … |
… |
|
| 48 | 46 | } |
| 49 | 47 | |
| 50 | 48 | if ( 1 !== parseInt( $toggleButton.data( 'start-masked' ), 10 ) ) { |
| 51 | | $pass1Wrap.addClass( 'show-password' ); |
| | 49 | $pass1.attr( 'type', 'text' ); |
| 52 | 50 | } else { |
| 53 | 51 | $toggleButton.trigger( 'click' ); |
| 54 | 52 | } |
| … |
… |
|
| 62 | 60 | |
| 63 | 61 | $pass1Wrap = $pass1.parent(); |
| 64 | 62 | |
| 65 | | $pass1Text = $( '<input type="text"/>' ) |
| 66 | | .attr( { |
| 67 | | 'id': 'pass1-text', |
| 68 | | 'name': 'pass1-text', |
| 69 | | 'autocomplete': 'off' |
| 70 | | } ) |
| 71 | | .addClass( $pass1[0].className ) |
| 72 | | .data( 'pw', $pass1.data( 'pw' ) ) |
| 73 | | .val( $pass1.val() ) |
| 74 | | .on( inputEvent, function () { |
| 75 | | if ( $pass1Text.val() === currentPass ) { |
| 76 | | return; |
| 77 | | } |
| 78 | | $pass2.val( $pass1Text.val() ); |
| 79 | | $pass1.val( $pass1Text.val() ).trigger( 'pwupdate' ); |
| 80 | | currentPass = $pass1Text.val(); |
| 81 | | } ); |
| 82 | | |
| 83 | | $pass1.after( $pass1Text ); |
| 84 | | |
| 85 | 63 | if ( 1 === parseInt( $pass1.data( 'reveal' ), 10 ) ) { |
| 86 | 64 | generatePassword(); |
| 87 | 65 | } |
| … |
… |
|
| 92 | 70 | } |
| 93 | 71 | |
| 94 | 72 | currentPass = $pass1.val(); |
| 95 | | if ( $pass1Text.val() !== currentPass ) { |
| 96 | | $pass1Text.val( currentPass ); |
| 97 | | } |
| 98 | | $pass1.add( $pass1Text ).removeClass( 'short bad good strong' ); |
| | 73 | |
| | 74 | $pass1.removeClass( 'short bad good strong' ); |
| 99 | 75 | showOrHideWeakPasswordCheckbox(); |
| 100 | 76 | } ); |
| 101 | 77 | } |
| 102 | 78 | |
| 103 | | function resetToggle() { |
| 104 | | $toggleButton |
| 105 | | .data( 'toggle', 0 ) |
| 106 | | .attr({ |
| 107 | | 'aria-label': userProfileL10n.ariaHide |
| 108 | | }) |
| 109 | | .find( '.text' ) |
| 110 | | .text( userProfileL10n.hide ) |
| 111 | | .end() |
| 112 | | .find( '.dashicons' ) |
| 113 | | .removeClass( 'dashicons-visibility' ) |
| 114 | | .addClass( 'dashicons-hidden' ); |
| 115 | | |
| 116 | | $pass1Text.focus(); |
| 117 | | |
| 118 | | $pass1Label.attr( 'for', 'pass1-text' ); |
| 119 | | } |
| 120 | | |
| 121 | 79 | function bindToggleButton() { |
| 122 | 80 | $toggleButton = $pass1Row.find('.wp-hide-pw'); |
| 123 | 81 | $toggleButton.show().on( 'click', function () { |
| 124 | | if ( 1 === parseInt( $toggleButton.data( 'toggle' ), 10 ) ) { |
| 125 | | $pass1Wrap.addClass( 'show-password' ); |
| 126 | | |
| 127 | | resetToggle(); |
| 128 | | |
| 129 | | if ( ! _.isUndefined( $pass1Text[0].setSelectionRange ) ) { |
| 130 | | $pass1Text[0].setSelectionRange( 0, 100 ); |
| 131 | | } |
| | 82 | if ( 'password' === $pass1.attr( 'type' ) ) { |
| | 83 | $pass1.attr( 'type', 'text' ); |
| | 84 | $toggleButton |
| | 85 | .attr({ |
| | 86 | 'title': userProfileL10n.ariaHide, |
| | 87 | 'aria-label': userProfileL10n.ariaHide |
| | 88 | }) |
| | 89 | .find( '.text' ) |
| | 90 | .text( userProfileL10n.hide ) |
| | 91 | .end() |
| | 92 | .find( '.dashicons' ) |
| | 93 | .removeClass( 'dashicons-visibility' ) |
| | 94 | .addClass( 'dashicons-hidden' ); |
| 132 | 95 | } else { |
| 133 | | $pass1Wrap.removeClass( 'show-password' ); |
| | 96 | $pass1.attr( 'type', 'password' ); |
| 134 | 97 | $toggleButton |
| 135 | | .data( 'toggle', 1 ) |
| 136 | 98 | .attr({ |
| | 99 | 'title': userProfileL10n.ariaShow, |
| 137 | 100 | 'aria-label': userProfileL10n.ariaShow |
| 138 | 101 | }) |
| 139 | 102 | .find( '.text' ) |
| … |
… |
|
| 143 | 106 | .removeClass('dashicons-hidden') |
| 144 | 107 | .addClass('dashicons-visibility'); |
| 145 | 108 | |
| 146 | | $pass1.focus(); |
| 147 | | |
| 148 | | $pass1Label.attr( 'for', 'pass1' ); |
| 149 | | |
| 150 | 109 | if ( ! _.isUndefined( $pass1[0].setSelectionRange ) ) { |
| 151 | 110 | $pass1[0].setSelectionRange( 0, 100 ); |
| 152 | 111 | } |
| 153 | 112 | } |
| | 113 | $pass1.focus(); |
| 154 | 114 | }); |
| 155 | 115 | } |
| 156 | 116 | |
| … |
… |
|
| 159 | 119 | $generateButton, |
| 160 | 120 | $cancelButton; |
| 161 | 121 | |
| 162 | | $pass1Row = $('.user-pass1-wrap'); |
| 163 | | $pass1Label = $pass1Row.find('th label').attr( 'for', 'pass1-text' ); |
| | 122 | $pass1Row = $('.user-pass1-wrap, .user-pass-wrap'); |
| 164 | 123 | |
| 165 | 124 | // hide this |
| 166 | 125 | $('.user-pass2-wrap').hide(); |
| … |
… |
|
| 180 | 139 | $pass1 = $('#pass1'); |
| 181 | 140 | if ( $pass1.length ) { |
| 182 | 141 | bindPass1(); |
| | 142 | } else { |
| | 143 | // Password field for the login form |
| | 144 | $pass1 = $('#user_pass'); |
| 183 | 145 | } |
| 184 | 146 | |
| 185 | 147 | /** |
| … |
… |
|
| 201 | 163 | if ( $pass1.is( ':hidden' ) ) { |
| 202 | 164 | $pass1.prop( 'disabled', true ); |
| 203 | 165 | $pass2.prop( 'disabled', true ); |
| 204 | | $pass1Text.prop( 'disabled', true ); |
| 205 | 166 | } |
| 206 | 167 | |
| 207 | 168 | $passwordWrapper = $pass1Row.find( '.wp-pwd' ); |
| … |
… |
|
| 223 | 184 | // Enable the inputs when showing. |
| 224 | 185 | $pass1.attr( 'disabled', false ); |
| 225 | 186 | $pass2.attr( 'disabled', false ); |
| 226 | | $pass1Text.attr( 'disabled', false ); |
| 227 | | |
| 228 | | if ( $pass1Text.val().length === 0 ) { |
| 229 | | generatePassword(); |
| 230 | | } |
| 231 | 187 | |
| 232 | | _.defer( function() { |
| 233 | | $pass1Text.focus(); |
| 234 | | if ( ! _.isUndefined( $pass1Text[0].setSelectionRange ) ) { |
| 235 | | $pass1Text[0].setSelectionRange( 0, 100 ); |
| 236 | | } |
| 237 | | }, 0 ); |
| 238 | 188 | } ); |
| 239 | 189 | |
| 240 | 190 | $cancelButton = $pass1Row.find( 'button.wp-cancel-pw' ); |
| 241 | 191 | $cancelButton.on( 'click', function () { |
| 242 | 192 | updateLock = false; |
| 243 | 193 | |
| 244 | | // Clear any entered password. |
| 245 | | $pass1Text.val( '' ); |
| 246 | | |
| 247 | 194 | // Generate a new password. |
| 248 | 195 | wp.ajax.post( 'generate-password' ) |
| 249 | 196 | .done( function( data ) { |
| … |
… |
|
| 260 | 207 | // Disable the inputs when hiding to prevent autofill and submission. |
| 261 | 208 | $pass1.prop( 'disabled', true ); |
| 262 | 209 | $pass2.prop( 'disabled', true ); |
| 263 | | $pass1Text.prop( 'disabled', true ); |
| 264 | 210 | |
| 265 | 211 | resetToggle(); |
| 266 | 212 | |
| … |
… |
|
| 277 | 223 | $pass1.prop( 'disabled', false ); |
| 278 | 224 | $pass2.prop( 'disabled', false ); |
| 279 | 225 | $pass2.val( $pass1.val() ); |
| 280 | | $pass1Wrap.removeClass( 'show-password' ); |
| 281 | 226 | }); |
| 282 | 227 | } |
| 283 | 228 | |
| … |
… |
|
| 317 | 262 | var passStrength = $('#pass-strength-result')[0]; |
| 318 | 263 | |
| 319 | 264 | if ( passStrength.className ) { |
| 320 | | $pass1.add( $pass1Text ).addClass( passStrength.className ); |
| | 265 | $pass1.addClass( passStrength.className ); |
| 321 | 266 | if ( $( passStrength ).is( '.short, .bad' ) ) { |
| 322 | 267 | if ( ! $weakCheckbox.prop( 'checked' ) ) { |
| 323 | 268 | $submitButtons.prop( 'disabled', true ); |
diff --git src/wp-admin/css/login.css src/wp-admin/css/login.css
index 686be7dde9..b8d93b791b 100644
|
|
|
p { |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | .login .password-input-wrapper { |
| 82 | | display: table; |
| | 82 | display: table; |
| | 83 | margin: 2px 0 16px 0; |
| 83 | 84 | } |
| 84 | 85 | |
| 85 | 86 | .login .input.password-input { |
| 86 | 87 | display: table-cell; |
| 87 | 88 | margin: 0; |
| | 89 | padding-right: 40px; |
| 88 | 90 | } |
| 89 | 91 | |
| 90 | 92 | .login .pw-weak { |
| … |
… |
p { |
| 92 | 94 | } |
| 93 | 95 | |
| 94 | 96 | .login .button.button-secondary { |
| 95 | | display: table-cell; |
| 96 | | border-radius: 0; |
| 97 | | vertical-align: middle; |
| | 97 | display: table-cell; |
| | 98 | border-radius: 0; |
| | 99 | box-shadow: none; |
| | 100 | height: 100%; |
| | 101 | vertical-align: middle; |
| | 102 | } |
| | 103 | |
| | 104 | .login .wp-hide-pw-wrap { |
| | 105 | display: table-cell; |
| | 106 | vertical-align: middle; |
| | 107 | height: 28px; |
| | 108 | } |
| | 109 | |
| | 110 | .login .wp-pwd { |
| | 111 | position: relative; |
| | 112 | } |
| | 113 | |
| | 114 | .login .wp-pwd .button { |
| | 115 | background: 0 0; |
| | 116 | border: none; |
| | 117 | box-shadow: none; |
| | 118 | line-height: 2; |
| | 119 | margin: 0; |
| | 120 | padding: 5px 10px; |
| | 121 | position: absolute; |
| | 122 | right: 0; |
| | 123 | top: 0; |
| | 124 | } |
| | 125 | |
| | 126 | .no-js .hide-if-no-js{ |
| | 127 | display: none; |
| 98 | 128 | } |
| 99 | 129 | |
| 100 | 130 | .login form { |
| … |
… |
p { |
| 231 | 261 | |
| 232 | 262 | .login #pass-strength-result { |
| 233 | 263 | font-weight: 600; |
| 234 | | margin: -1px 5px 16px 0; |
| | 264 | margin: -17px 5px 16px 0; |
| 235 | 265 | padding: 6px 5px; |
| 236 | 266 | text-align: center; |
| 237 | 267 | width: 100%; |
diff --git src/wp-login.php src/wp-login.php
index 263a19637b..179d2716a9 100644
|
|
|
function login_header( $title = 'Log In', $message = '', $wp_error = null ) { |
| 175 | 175 | |
| 176 | 176 | ?> |
| 177 | 177 | </head> |
| 178 | | <body class="login <?php echo esc_attr( implode( ' ', $classes ) ); ?>"> |
| | 178 | <body class="login no-js <?php echo esc_attr( implode( ' ', $classes ) ); ?>"> |
| | 179 | <script type="text/javascript"> |
| | 180 | document.body.className = document.body.className.replace('no-js','js'); |
| | 181 | </script> |
| 179 | 182 | <?php |
| 180 | 183 | /** |
| 181 | 184 | * Fires in the login page header after the body tag is opened. |
| … |
… |
switch ( $action ) { |
| 606 | 609 | ?> |
| 607 | 610 | |
| 608 | 611 | <form name="lostpasswordform" id="lostpasswordform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" method="post"> |
| 609 | | <p> |
| 610 | | <label for="user_login" ><?php _e( 'Username or Email Address' ); ?><br /> |
| 611 | | <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" /></label> |
| 612 | | </p> |
| | 612 | <div> |
| | 613 | <label for="user_login" ><?php _e( 'Username or Email Address' ); ?></label> |
| | 614 | <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" /> |
| | 615 | </div> |
| 613 | 616 | <?php |
| 614 | 617 | /** |
| 615 | 618 | * Fires inside the lostpassword form tags, before the hidden fields. |
| … |
… |
switch ( $action ) { |
| 619 | 622 | do_action( 'lostpassword_form' ); |
| 620 | 623 | ?> |
| 621 | 624 | <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> |
| 622 | | <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Get New Password' ); ?>" /></p> |
| | 625 | <div class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Get New Password' ); ?>" /></div> |
| 623 | 626 | </form> |
| 624 | 627 | |
| 625 | | <p id="nav"> |
| 626 | | <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> |
| 627 | | <?php |
| 628 | | if ( get_option( 'users_can_register' ) ) : |
| 629 | | $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); |
| | 628 | <div id="nav"> |
| | 629 | <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> |
| | 630 | <?php |
| | 631 | if ( get_option( 'users_can_register' ) ) : |
| | 632 | $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); |
| 630 | 633 | |
| 631 | | echo esc_html( $login_link_separator ); |
| | 634 | echo esc_html( $login_link_separator ); |
| 632 | 635 | |
| 633 | | /** This filter is documented in wp-includes/general-template.php */ |
| 634 | | echo apply_filters( 'register', $registration_url ); |
| 635 | | endif; |
| 636 | | ?> |
| 637 | | </p> |
| | 636 | /** This filter is documented in wp-includes/general-template.php */ |
| | 637 | echo apply_filters( 'register', $registration_url ); |
| | 638 | endif; |
| | 639 | ?> |
| | 640 | </div> |
| 638 | 641 | |
| 639 | 642 | <?php |
| 640 | 643 | login_footer( 'user_login' ); |
| … |
… |
switch ( $action ) { |
| 710 | 713 | <input type="hidden" id="user_login" value="<?php echo esc_attr( $rp_login ); ?>" autocomplete="off" /> |
| 711 | 714 | |
| 712 | 715 | <div class="user-pass1-wrap"> |
| 713 | | <p> |
| 714 | | <label for="pass1"><?php _e( 'New password' ); ?></label> |
| 715 | | </p> |
| | 716 | |
| | 717 | <label for="pass1"><?php _e( 'New password' ); ?></label> |
| 716 | 718 | |
| 717 | 719 | <div class="wp-pwd"> |
| 718 | 720 | <div class="password-input-wrapper"> |
| 719 | 721 | <input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 16 ) ); ?>" name="pass1" id="pass1" class="input password-input" size="24" value="" autocomplete="off" aria-describedby="pass-strength-result" /> |
| 720 | | <span class="button button-secondary wp-hide-pw hide-if-no-js"> |
| 721 | | <span class="dashicons dashicons-hidden"></span> |
| 722 | | </span> |
| | 722 | |
| | 723 | <div class="wp-hide-pw-wrap hide-if-no-js"> |
| | 724 | <button type="button" class="button button-secondary wp-hide-pw" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>"> |
| | 725 | <span class="dashicons dashicons-hidden"></span> |
| | 726 | <span class="text"><?php _e( 'Hide' ); ?></span> |
| | 727 | </button> |
| | 728 | </div> |
| | 729 | |
| 723 | 730 | </div> |
| 724 | 731 | <div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator' ); ?></div> |
| 725 | 732 | </div> |
| … |
… |
switch ( $action ) { |
| 731 | 738 | </div> |
| 732 | 739 | </div> |
| 733 | 740 | |
| 734 | | <p class="user-pass2-wrap"> |
| 735 | | <label for="pass2"><?php _e( 'Confirm new password' ); ?></label><br /> |
| | 741 | <div class="user-pass2-wrap"> |
| | 742 | <label for="pass2"><?php _e( 'Confirm new password' ); ?></label> |
| 736 | 743 | <input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" /> |
| 737 | | </p> |
| | 744 | </div> |
| 738 | 745 | |
| 739 | 746 | <p class="description indicator-hint"><?php echo wp_get_password_hint(); ?></p> |
| 740 | 747 | <br class="clear" /> |
| … |
… |
switch ( $action ) { |
| 750 | 757 | do_action( 'resetpass_form', $user ); |
| 751 | 758 | ?> |
| 752 | 759 | <input type="hidden" name="rp_key" value="<?php echo esc_attr( $rp_key ); ?>" /> |
| 753 | | <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Reset Password' ); ?>" /></p> |
| | 760 | <div class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Reset Password' ); ?>" /></div> |
| 754 | 761 | </form> |
| 755 | 762 | |
| 756 | | <p id="nav"> |
| 757 | | <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> |
| 758 | | <?php |
| 759 | | if ( get_option( 'users_can_register' ) ) : |
| 760 | | $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); |
| | 763 | <div id="nav"> |
| | 764 | <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> |
| | 765 | <?php |
| | 766 | if ( get_option( 'users_can_register' ) ) : |
| | 767 | $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); |
| 761 | 768 | |
| 762 | | echo esc_html( $login_link_separator ); |
| | 769 | echo esc_html( $login_link_separator ); |
| 763 | 770 | |
| 764 | | /** This filter is documented in wp-includes/general-template.php */ |
| 765 | | echo apply_filters( 'register', $registration_url ); |
| 766 | | endif; |
| 767 | | ?> |
| 768 | | </p> |
| | 771 | /** This filter is documented in wp-includes/general-template.php */ |
| | 772 | echo apply_filters( 'register', $registration_url ); |
| | 773 | endif; |
| | 774 | ?> |
| | 775 | </div> |
| 769 | 776 | |
| 770 | 777 | <?php |
| 771 | 778 | login_footer( 'user_pass' ); |
| … |
… |
switch ( $action ) { |
| 826 | 833 | login_header( __( 'Registration Form' ), '<p class="message register">' . __( 'Register For This Site' ) . '</p>', $errors ); |
| 827 | 834 | ?> |
| 828 | 835 | <form name="registerform" id="registerform" action="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" method="post" novalidate="novalidate"> |
| 829 | | <p> |
| 830 | | <label for="user_login"><?php _e( 'Username' ); ?><br /> |
| 831 | | <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( wp_unslash( $user_login ) ); ?>" size="20" autocapitalize="off" /></label> |
| 832 | | </p> |
| 833 | | <p> |
| 834 | | <label for="user_email"><?php _e( 'Email' ); ?><br /> |
| 835 | | <input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr( wp_unslash( $user_email ) ); ?>" size="25" /></label> |
| 836 | | </p> |
| | 836 | <div> |
| | 837 | <label for="user_login"><?php _e( 'Username' ); ?></label> |
| | 838 | <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr( wp_unslash( $user_login ) ); ?>" size="20" autocapitalize="off" /> |
| | 839 | </div> |
| | 840 | <div> |
| | 841 | <label for="user_email"><?php _e( 'Email' ); ?></label> |
| | 842 | <input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr( wp_unslash( $user_email ) ); ?>" size="25" /> |
| | 843 | </div> |
| 837 | 844 | <?php |
| 838 | 845 | /** |
| 839 | 846 | * Fires following the 'Email' field in the user registration form. |
| … |
… |
switch ( $action ) { |
| 845 | 852 | <p id="reg_passmail"><?php _e( 'Registration confirmation will be emailed to you.' ); ?></p> |
| 846 | 853 | <br class="clear" /> |
| 847 | 854 | <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> |
| 848 | | <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Register' ); ?>" /></p> |
| | 855 | <div class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Register' ); ?>" /></div> |
| 849 | 856 | </form> |
| 850 | 857 | |
| 851 | | <p id="nav"> |
| 852 | | <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> |
| 853 | | <?php echo esc_html( $login_link_separator ); ?> |
| 854 | | <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a> |
| 855 | | </p> |
| | 858 | <div id="nav"> |
| | 859 | <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> |
| | 860 | <?php echo esc_html( $login_link_separator ); ?> |
| | 861 | <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a> |
| | 862 | </div> |
| 856 | 863 | |
| 857 | 864 | <?php |
| 858 | 865 | login_footer( 'user_login' ); |
| … |
… |
switch ( $action ) { |
| 1062 | 1069 | } else { |
| 1063 | 1070 | $aria_describedby_error = ''; |
| 1064 | 1071 | } |
| | 1072 | |
| | 1073 | wp_enqueue_script( 'user-profile' ); |
| 1065 | 1074 | ?> |
| 1066 | 1075 | |
| 1067 | 1076 | <form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post"> |
| 1068 | | <p> |
| 1069 | | <label for="user_login"><?php _e( 'Username or Email Address' ); ?><br /> |
| 1070 | | <input type="text" name="log" id="user_login"<?php echo $aria_describedby_error; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" /></label> |
| 1071 | | </p> |
| 1072 | | <p> |
| 1073 | | <label for="user_pass"><?php _e( 'Password' ); ?><br /> |
| 1074 | | <input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby_error; ?> class="input" value="" size="20" /></label> |
| 1075 | | </p> |
| | 1077 | <div> |
| | 1078 | <label for="user_login"><?php _e( 'Username or Email Address' ); ?></label> |
| | 1079 | <input type="text" name="log" id="user_login"<?php echo $aria_describedby_error; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" /> |
| | 1080 | </div> |
| | 1081 | <div class="user-pass-wrap"> |
| | 1082 | <label for="user_pass"><?php _e( 'Password' ); ?></label> |
| | 1083 | <div class="wp-pwd"> |
| | 1084 | <div class="password-input-wrapper"> |
| | 1085 | <input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby_error; ?> class="input password-input" value="" size="20" /> |
| | 1086 | <div class="wp-hide-pw-wrap hide-if-no-js" style=" |
| | 1087 | "> |
| | 1088 | <button type="button" class="button button-secondary wp-hide-pw" data-toggle="0" title="<?php esc_attr_e( 'Show password' ); ?>" aria-label="<?php esc_attr_e( 'Show password' ); ?>"> |
| | 1089 | <span class="dashicons dashicons-visibility"></span> |
| | 1090 | </button> |
| | 1091 | </div> |
| | 1092 | |
| | 1093 | </div> |
| | 1094 | </div> |
| | 1095 | |
| | 1096 | </div> |
| | 1097 | |
| 1076 | 1098 | <?php |
| 1077 | 1099 | /** |
| 1078 | 1100 | * Fires following the 'Password' field in the login form. |
| … |
… |
switch ( $action ) { |
| 1081 | 1103 | */ |
| 1082 | 1104 | do_action( 'login_form' ); |
| 1083 | 1105 | ?> |
| 1084 | | <p class="forgetmenot"><label for="rememberme"><input name="rememberme" type="checkbox" id="rememberme" value="forever" <?php checked( $rememberme ); ?> /> <?php esc_html_e( 'Remember Me' ); ?></label></p> |
| 1085 | | <p class="submit"> |
| | 1106 | <div class="forgetmenot"><label for="rememberme"><input name="rememberme" type="checkbox" id="rememberme" value="forever" <?php checked( $rememberme ); ?> /> <?php esc_html_e( 'Remember Me' ); ?></label></div> |
| | 1107 | <div class="submit"> |
| 1086 | 1108 | <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Log In' ); ?>" /> |
| 1087 | 1109 | <?php if ( $interim_login ) { ?> |
| 1088 | 1110 | <input type="hidden" name="interim-login" value="1" /> |
| … |
… |
switch ( $action ) { |
| 1093 | 1115 | <input type="hidden" name="customize-login" value="1" /> |
| 1094 | 1116 | <?php endif; ?> |
| 1095 | 1117 | <input type="hidden" name="testcookie" value="1" /> |
| 1096 | | </p> |
| | 1118 | </div> |
| 1097 | 1119 | </form> |
| 1098 | 1120 | |
| 1099 | 1121 | <?php if ( ! $interim_login ) { ?> |
| 1100 | | <p id="nav"> |
| 1101 | | <?php |
| 1102 | | if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) : |
| 1103 | | if ( get_option( 'users_can_register' ) ) : |
| 1104 | | $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); |
| | 1122 | <div id="nav"> |
| | 1123 | <?php |
| | 1124 | if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) : |
| | 1125 | if ( get_option( 'users_can_register' ) ) : |
| | 1126 | $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); |
| 1105 | 1127 | |
| 1106 | | /** This filter is documented in wp-includes/general-template.php */ |
| 1107 | | echo apply_filters( 'register', $registration_url ); |
| | 1128 | /** This filter is documented in wp-includes/general-template.php */ |
| | 1129 | echo apply_filters( 'register', $registration_url ); |
| 1108 | 1130 | |
| 1109 | | echo esc_html( $login_link_separator ); |
| 1110 | | endif; |
| 1111 | | ?> |
| 1112 | | <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a> |
| 1113 | | <?php endif; ?> |
| 1114 | | </p> |
| | 1131 | echo esc_html( $login_link_separator ); |
| | 1132 | endif; |
| | 1133 | ?> |
| | 1134 | <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a> |
| | 1135 | <?php endif; ?> |
| | 1136 | </div> |
| 1115 | 1137 | <?php } ?> |
| 1116 | 1138 | |
| 1117 | 1139 | <script type="text/javascript"> |