| @@ -1,53 +1,53 @@ | ||
| 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 4.0.0 | |
| 10 | - */ | |
| 11 | - | |
| 12 | -defined( 'ABSPATH' ) || exit(); | |
| 13 | - | |
| 14 | -$profile = LP_Profile::instance(); | |
| 15 | -$privacy = $profile->get_privacy_settings(); | |
| 16 | -?> | |
| 17 | - | |
| 18 | -<form method="post" name="profile-privacy" enctype="multipart/form-data" class="learn-press-form"> | |
| 19 | - | |
| 20 | - <?php do_action( 'learn-press/before-profile-privacy-fields', $profile ); ?> | |
| 21 | - | |
| 22 | - <ul class="form-fields"> | |
| 23 | - | |
| 24 | - <?php | |
| 25 | - do_action( 'learn-press/begin-profile-privacy-fields', $profile ); | |
| 26 | - | |
| 27 | - foreach ( $privacy as $item ) { | |
| 28 | - ?> | |
| 29 | - <li class="form-field"> | |
| 30 | - <label for="privacy-<?php echo esc_attr( $item['id'] ); ?>"><?php echo esc_html( $item['name'] ); ?></label> | |
| 31 | - <div class="form-field-input"> | |
| 32 | - <input type="hidden" name="privacy[<?php echo esc_attr( $item['id'] ); ?>]" value="no"/> | |
| 33 | - <input type="checkbox" name="privacy[<?php echo esc_attr( $item['id'] ); ?>]" value="yes" id="privacy-<?php echo esc_attr( $item['id'] ); ?>" <?php checked( $profile->get_privacy( $item['id'] ), 'yes' ); ?>/> | |
| 34 | - | |
| 35 | - <?php if ( ! empty( $item['description'] ) ) : ?> | |
| 36 | - <p class="description"><?php echo esc_html( $item['description'] ); ?></p> | |
| 37 | - <?php endif; ?> | |
| 38 | - </div> | |
| 39 | - </li> | |
| 40 | - <?php | |
| 41 | - } | |
| 42 | - ?> | |
| 43 | - | |
| 44 | - <?php do_action( 'learn-press/end-profile-privacy-fields', $profile ); ?> | |
| 45 | - | |
| 46 | - </ul> | |
| 47 | - <input type="hidden" name="save-profile-privacy" value="<?php echo wp_create_nonce( 'learn-press-save-profile-privacy' ); ?>"/> | |
| 48 | - | |
| 49 | - <?php do_action( 'learn-press/after-profile-privacy-fields', $profile ); ?> | |
| 50 | - | |
| 51 | - <button type="submit" name="submit" id="submit"><?php esc_html_e( 'Save changes', 'learnpress' ); ?></button> | |
| 52 | - | |
| 53 | -</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 4.0.0 | |
| 10 | + */ | |
| 11 | + | |
| 12 | +defined( 'ABSPATH' ) || exit(); | |
| 13 | + | |
| 14 | +$profile = LP_Profile::instance(); | |
| 15 | +$privacy = $profile->get_privacy_settings(); | |
| 16 | +?> | |
| 17 | + | |
| 18 | +<form method="post" name="profile-privacy" enctype="multipart/form-data" class="learn-press-form"> | |
| 19 | + | |
| 20 | + <?php do_action( 'learn-press/before-profile-privacy-fields', $profile ); ?> | |
| 21 | + | |
| 22 | + <ul class="form-fields"> | |
| 23 | + | |
| 24 | + <?php | |
| 25 | + do_action( 'learn-press/begin-profile-privacy-fields', $profile ); | |
| 26 | + | |
| 27 | + foreach ( $privacy as $item ) { | |
| 28 | + ?> | |
| 29 | + <li class="form-field"> | |
| 30 | + <label for="privacy-<?php echo esc_attr( $item['id'] ); ?>"><?php echo esc_html( $item['name'] ); ?></label> | |
| 31 | + <div class="form-field-input"> | |
| 32 | + <input type="hidden" name="privacy[<?php echo esc_attr( $item['id'] ); ?>]" value="no"/> | |
| 33 | + <input type="checkbox" name="privacy[<?php echo esc_attr( $item['id'] ); ?>]" value="yes" id="privacy-<?php echo esc_attr( $item['id'] ); ?>" <?php checked( $profile->get_privacy( $item['id'] ), 'yes' ); ?>/> | |
| 34 | + | |
| 35 | + <?php if ( ! empty( $item['description'] ) ) : ?> | |
| 36 | + <p class="description"><?php echo esc_html( $item['description'] ); ?></p> | |
| 37 | + <?php endif; ?> | |
| 38 | + </div> | |
| 39 | + </li> | |
| 40 | + <?php | |
| 41 | + } | |
| 42 | + ?> | |
| 43 | + | |
| 44 | + <?php do_action( 'learn-press/end-profile-privacy-fields', $profile ); ?> | |
| 45 | + | |
| 46 | + </ul> | |
| 47 | + <input type="hidden" name="save-profile-privacy" value="<?php echo wp_create_nonce( 'learn-press-save-profile-privacy' ); ?>"/> | |
| 48 | + | |
| 49 | + <?php do_action( 'learn-press/after-profile-privacy-fields', $profile ); ?> | |
| 50 | + | |
| 51 | + <button type="submit" name="submit" id="submit"><?php esc_html_e( 'Save changes', 'learnpress' ); ?></button> | |
| 52 | + | |
| 53 | +</form> | |