Make WordPress Core

Ticket #52597: 52597.diff

File 52597.diff, 1.8 KB (added by mukesh27, 4 years ago)

Initial Patch.

  • wp-admin/user-edit.php

    diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php
    index 1df6cdd150..1de51bb39b 100644
    a b endif; 
    609609        </td>
    610610</tr>
    611611<?php endif; ?>
    612                 <?php
    613                 // Allow admins to send reset password link
    614                 if ( ! IS_PROFILE_PAGE ) :
    615                         ?>
    616         <tr class="user-sessions-wrap hide-if-no-js">
    617                 <th><?php _e( 'Password Reset' ); ?></th>
    618                 <td>
    619                         <div class="generate-reset-link">
    620                                 <button type="button" class="button button-secondary" id="generate-reset-link">
    621                                         <?php _e( 'Send Reset Link' ); ?>
    622                                 </button>
    623                         </div>
    624                         <p class="description">
    625                                 <?php
    626                                 /* translators: %s: User's display name. */
    627                                 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 ) );
    628                                 ?>
    629                         </p>
    630                 </td>
    631         </tr>
    632                 <?php endif; ?>
    633 
    634612                <?php
    635613                /**
    636614                 * Filters the display of the password fields.
    endif; 
    691669        </td>
    692670</tr>
    693671        <?php endif; ?>
    694 
     672                <?php
     673                // Allow admins to send reset password link
     674                if ( ! IS_PROFILE_PAGE ) :
     675                        ?>
     676        <tr class="user-sessions-wrap hide-if-no-js">
     677                <th><?php _e( 'Password Reset' ); ?></th>
     678                <td>
     679                        <div class="generate-reset-link">
     680                                <button type="button" class="button button-secondary" id="generate-reset-link">
     681                                        <?php _e( 'Send Reset Link' ); ?>
     682                                </button>
     683                        </div>
     684                        <p class="description">
     685                                <?php
     686                                /* translators: %s: User's display name. */
     687                                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 ) );
     688                                ?>
     689                        </p>
     690                </td>
     691        </tr>
     692                <?php endif; ?>
    695693                <?php
    696694                if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) :
    697695                        ?>