← All changes
|
templates/profile/tabs/settings/change-password.php
+61
-61
4.3.9.1
→
4.4.9
View file →
| @@ -1,61 +1,61 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Template for displaying change password form in profile page. | |
| 4 | - * | |
| 5 | - * This template can be overridden by copying it to yourtheme/learnpress/settings/tabs/change-password.php. | |
| 6 | - * | |
| 7 | - * @author ThimPress | |
| 8 | - * @package Learnpress/Templates | |
| 9 | - * @version 3.0.0 | |
| 10 | - */ | |
| 11 | - | |
| 12 | -defined( 'ABSPATH' ) || exit(); | |
| 13 | - | |
| 14 | -$profile = LP_Profile::instance(); | |
| 15 | - | |
| 16 | -if ( ! isset( $section ) ) { | |
| 17 | - $section = 'change-password'; | |
| 18 | -} | |
| 19 | -?> | |
| 20 | - | |
| 21 | -<form method="post" name="profile-change-password" enctype="multipart/form-data" class="learn-press-form"> | |
| 22 | - | |
| 23 | - <?php do_action( 'learn-press/before-profile-change-password-fields', $profile ); ?> | |
| 24 | - | |
| 25 | - <ul class="form-fields"> | |
| 26 | - | |
| 27 | - <?php do_action( 'learn-press/begin-profile-change-password-fields', $profile ); ?> | |
| 28 | - | |
| 29 | - <li class="form-field"> | |
| 30 | - <label for="pass0"><?php esc_html_e( 'Current password', 'learnpress' ); ?></label> | |
| 31 | - <div class="form-field-input"> | |
| 32 | - <input type="password" id="pass0" name="pass0" autocomplete="off" class="regular-text"/> | |
| 33 | - </div> | |
| 34 | - </li> | |
| 35 | - <li class="form-field"> | |
| 36 | - <label for="pass1"><?php esc_html_e( 'New password', 'learnpress' ); ?></label> | |
| 37 | - <div class="form-field-input"> | |
| 38 | - <input type="password" name="pass1" id="pass1" class="regular-text" value=""/> | |
| 39 | - </div> | |
| 40 | - </li> | |
| 41 | - <li class="form-field"> | |
| 42 | - <label for="pass2"><?php esc_html_e( 'Confirm new password', 'learnpress' ); ?></label> | |
| 43 | - <div class="form-field-input"> | |
| 44 | - <input name="pass2" type="password" id="pass2" class="regular-text" value=""/> | |
| 45 | - <p id="lp-password-not-match" class="description lp-field-error-message hide-if-js"><?php esc_html_e( 'The new password does not match!', 'learnpress' ); ?></p> | |
| 46 | - </div> | |
| 47 | - </li> | |
| 48 | - | |
| 49 | - <?php do_action( 'learn-press/end-profile-change-password-fields', $profile ); ?> | |
| 50 | - | |
| 51 | - </ul> | |
| 52 | - | |
| 53 | - <?php do_action( 'learn-press/after-profile-change-password-fields', $profile ); ?> | |
| 54 | - | |
| 55 | - <p> | |
| 56 | - <input type="hidden" name="save-profile-password" value="<?php echo wp_create_nonce( 'learn-press-save-profile-password' ); ?>"> | |
| 57 | - </p> | |
| 58 | - | |
| 59 | - <button class="lp-button" type="submit" name="submit" id="submit"><?php esc_html_e( 'Save changes', 'learnpress' ); ?></button> | |
| 60 | - | |
| 61 | -</form> | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Template for displaying change password form in profile page. | |
| 4 | + * | |
| 5 | + * This template can be overridden by copying it to yourtheme/learnpress/settings/tabs/change-password.php. | |
| 6 | + * | |
| 7 | + * @author ThimPress | |
| 8 | + * @package Learnpress/Templates | |
| 9 | + * @version 3.0.0 | |
| 10 | + */ | |
| 11 | + | |
| 12 | +defined( 'ABSPATH' ) || exit(); | |
| 13 | + | |
| 14 | +$profile = LP_Profile::instance(); | |
| 15 | + | |
| 16 | +if ( ! isset( $section ) ) { | |
| 17 | + $section = 'change-password'; | |
| 18 | +} | |
| 19 | +?> | |
| 20 | + | |
| 21 | +<form method="post" name="profile-change-password" enctype="multipart/form-data" class="learn-press-form"> | |
| 22 | + | |
| 23 | + <?php do_action( 'learn-press/before-profile-change-password-fields', $profile ); ?> | |
| 24 | + | |
| 25 | + <ul class="form-fields"> | |
| 26 | + | |
| 27 | + <?php do_action( 'learn-press/begin-profile-change-password-fields', $profile ); ?> | |
| 28 | + | |
| 29 | + <li class="form-field"> | |
| 30 | + <label for="pass0"><?php esc_html_e( 'Current password', 'learnpress' ); ?></label> | |
| 31 | + <div class="form-field-input"> | |
| 32 | + <input type="password" id="pass0" name="pass0" autocomplete="off" class="regular-text"/> | |
| 33 | + </div> | |
| 34 | + </li> | |
| 35 | + <li class="form-field"> | |
| 36 | + <label for="pass1"><?php esc_html_e( 'New password', 'learnpress' ); ?></label> | |
| 37 | + <div class="form-field-input"> | |
| 38 | + <input type="password" name="pass1" id="pass1" class="regular-text" value=""/> | |
| 39 | + </div> | |
| 40 | + </li> | |
| 41 | + <li class="form-field"> | |
| 42 | + <label for="pass2"><?php esc_html_e( 'Confirm new password', 'learnpress' ); ?></label> | |
| 43 | + <div class="form-field-input"> | |
| 44 | + <input name="pass2" type="password" id="pass2" class="regular-text" value=""/> | |
| 45 | + <p id="lp-password-not-match" class="description lp-field-error-message hide-if-js"><?php esc_html_e( 'The new password does not match!', 'learnpress' ); ?></p> | |
| 46 | + </div> | |
| 47 | + </li> | |
| 48 | + | |
| 49 | + <?php do_action( 'learn-press/end-profile-change-password-fields', $profile ); ?> | |
| 50 | + | |
| 51 | + </ul> | |
| 52 | + | |
| 53 | + <?php do_action( 'learn-press/after-profile-change-password-fields', $profile ); ?> | |
| 54 | + | |
| 55 | + <p> | |
| 56 | + <input type="hidden" name="save-profile-password" value="<?php echo wp_create_nonce( 'learn-press-save-profile-password' ); ?>"> | |
| 57 | + </p> | |
| 58 | + | |
| 59 | + <button class="lp-button" type="submit" name="submit" id="submit"><?php esc_html_e( 'Save changes', 'learnpress' ); ?></button> | |
| 60 | + | |
| 61 | +</form> | |