Users: Relocate the Password Reset feature to the Account Management section.

Follow-up to [50129].

Props mukesh27, audrasjb, hellofromTonya.
Fixes #52597.

git-svn-id: https://develop.svn.wordpress.org/trunk@50411 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2021-02-23 14:20:01 +00:00
parent d7ddc7a81e
commit 3bf334edaa

View File

@ -609,28 +609,6 @@ endif;
</td>
</tr>
<?php endif; ?>
<?php
// Allow admins to send reset password link
if ( ! IS_PROFILE_PAGE ) :
?>
<tr class="user-sessions-wrap hide-if-no-js">
<th><?php _e( 'Password Reset' ); ?></th>
<td>
<div class="generate-reset-link">
<button type="button" class="button button-secondary" id="generate-reset-link">
<?php _e( 'Send Reset Link' ); ?>
</button>
</div>
<p class="description">
<?php
/* translators: %s: User's display name. */
printf( __( 'Send %s a link to reset their password. This will not change their password, nor will it force a change.' ), esc_html( $profileuser->display_name ) );
?>
</p>
</td>
</tr>
<?php endif; ?>
<?php
/**
* Filters the display of the password fields.
@ -692,6 +670,28 @@ endif;
</tr>
<?php endif; ?>
<?php
// Allow admins to send reset password link.
if ( ! IS_PROFILE_PAGE ) :
?>
<tr class="user-sessions-wrap hide-if-no-js">
<th><?php _e( 'Password Reset' ); ?></th>
<td>
<div class="generate-reset-link">
<button type="button" class="button button-secondary" id="generate-reset-link">
<?php _e( 'Send Reset Link' ); ?>
</button>
</div>
<p class="description">
<?php
/* translators: %s: User's display name. */
printf( __( 'Send %s a link to reset their password. This will not change their password, nor will it force a change.' ), esc_html( $profileuser->display_name ) );
?>
</p>
</td>
</tr>
<?php endif; ?>
<?php
if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) :
?>