about-us
5 days ago
partials
5 days ago
passkeys
5 days ago
policies
5 days ago
reports
5 days ago
support
5 days ago
customize-code-page.php
5 days ago
customize-setup-wizard.php
5 days ago
customize-user-profile.php
5 days ago
customize-user-prompts.php
5 days ago
email-settings.php
5 days ago
general-settings.php
5 days ago
generic-settings.php
5 days ago
import-export.php
5 days ago
index.php
5 days ago
plugins-integrations.php
5 days ago
providers-integrations.php
5 days ago
sidebar.php
5 days ago
white-labeling.php
5 days ago
customize-user-profile.php
132 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Settings Template – Customize 2FA user profile page area. |
| 4 | * |
| 5 | * @package wp-2fa |
| 6 | * |
| 7 | * @since 4.0.0 |
| 8 | */ |
| 9 | |
| 10 | use WP2FA\WP2FA; |
| 11 | use WP2FA\Admin\Settings_Builder; |
| 12 | |
| 13 | ?> |
| 14 | <div class="settings-page" id="customize-user-profile-wrap"> |
| 15 | |
| 16 | <?php |
| 17 | Settings_Builder::build_option( |
| 18 | array( |
| 19 | 'parent' => \esc_html__( 'White labeling', 'wp-2fa' ), |
| 20 | 'type' => 'breadcrumb', |
| 21 | 'custom_class' => 'back-policies-settings-main-wrapper', |
| 22 | 'default' => \esc_html__( 'Customize 2FA user profile page area', 'wp-2fa' ), |
| 23 | ) |
| 24 | ); |
| 25 | Settings_Builder::build_option( |
| 26 | array( |
| 27 | 'title' => esc_html__( 'Customize 2FA user profile page area', 'wp-2fa' ), |
| 28 | 'id' => 'wp-2fa-user-profile-settings-tab', |
| 29 | 'type' => 'tab-title', |
| 30 | ) |
| 31 | ); |
| 32 | |
| 33 | Settings_Builder::build_option( |
| 34 | array( |
| 35 | 'text' => \wp_sprintf( |
| 36 | \esc_html__( 'Customize the title and description shown in the 2FA section of each user\'s WordPress profile page. %1$s.', 'wp-2fa' ), |
| 37 | \wp_sprintf( '<a href="%s" target="_blank">%s</a>', 'https://melapress.com/support/kb/wp-2fa-customize-user-2fa-experience/?#utm_source=plugin&utm_medium=wp2fa&utm_campaign=guide_customize_2fa_user_experience', \esc_html__( 'Learn more', 'wp-2fa' ) ) |
| 38 | ), |
| 39 | 'class' => 'description-settings-card', |
| 40 | 'id' => 'wp-2fa-user-profile-settings-tab', |
| 41 | 'type' => 'description', |
| 42 | ) |
| 43 | ); |
| 44 | ?> |
| 45 | |
| 46 | <div class="settings-card"> |
| 47 | <?php |
| 48 | // Settings_Builder::build_option( |
| 49 | // array( |
| 50 | // 'title' => esc_html__( 'Customize 2FA user profile page area', 'wp-2fa' ), |
| 51 | // 'id' => 'user-profile-section', |
| 52 | // 'type' => 'section-title', |
| 53 | // ) |
| 54 | // ); |
| 55 | ?> |
| 56 | |
| 57 | <div class="form-group settings-row"> |
| 58 | <div class="settings-label-group"> |
| 59 | <?php |
| 60 | Settings_Builder::build_option( |
| 61 | array( |
| 62 | 'text' => \esc_html__( 'User profile 2FA configuration area title', 'wp-2fa' ), |
| 63 | 'id' => 'user-profile-title-label', |
| 64 | 'type' => 'settings-label', |
| 65 | ) |
| 66 | ); |
| 67 | Settings_Builder::build_option( |
| 68 | array( |
| 69 | 'text' => \esc_html__( 'The heading shown above the 2FA section on each user\'s WordPress profile page.', 'wp-2fa' ), |
| 70 | 'class' => 'description-settings-card', |
| 71 | 'id' => 'user-profile-title-desc', |
| 72 | 'type' => 'description', |
| 73 | ) |
| 74 | ); |
| 75 | ?> |
| 76 | </div> |
| 77 | <div class="settings-control"> |
| 78 | <?php |
| 79 | Settings_Builder::build_option( |
| 80 | array( |
| 81 | 'id' => 'user-profile-form-preamble-title', |
| 82 | 'type' => 'editor', |
| 83 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 84 | 'class' => 'form-input', |
| 85 | 'option_name' => 'wp_2fa_white_label[user-profile-form-preamble-title]', |
| 86 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'user-profile-form-preamble-title', true ), |
| 87 | 'hint' => \esc_html__( 'Only plain text is allowed.', 'wp-2fa' ), |
| 88 | ) |
| 89 | ); |
| 90 | ?> |
| 91 | </div> |
| 92 | </div> |
| 93 | |
| 94 | <div class="form-group settings-row"> |
| 95 | <div class="settings-label-group"> |
| 96 | <?php |
| 97 | Settings_Builder::build_option( |
| 98 | array( |
| 99 | 'text' => \esc_html__( 'User profile 2FA configuration area description', 'wp-2fa' ), |
| 100 | 'id' => 'user-profile-desc-label', |
| 101 | 'type' => 'settings-label', |
| 102 | ) |
| 103 | ); |
| 104 | Settings_Builder::build_option( |
| 105 | array( |
| 106 | 'text' => \esc_html__( 'The short text shown under that heading, describing the 2FA section on the user\'s profile page.', 'wp-2fa' ), |
| 107 | 'class' => 'description-settings-card', |
| 108 | 'id' => 'user-profile-desc-desc', |
| 109 | 'type' => 'description', |
| 110 | ) |
| 111 | ); |
| 112 | ?> |
| 113 | </div> |
| 114 | <div class="settings-control"> |
| 115 | <?php |
| 116 | Settings_Builder::build_option( |
| 117 | array( |
| 118 | 'id' => 'user-profile-form-preamble-desc', |
| 119 | 'type' => 'editor', |
| 120 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 121 | 'class' => 'form-input', |
| 122 | 'option_name' => 'wp_2fa_white_label[user-profile-form-preamble-desc]', |
| 123 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'user-profile-form-preamble-desc', true ), |
| 124 | 'hint' => \esc_html__( 'Only plain text is allowed.', 'wp-2fa' ), |
| 125 | ) |
| 126 | ); |
| 127 | ?> |
| 128 | </div> |
| 129 | </div> |
| 130 | </div> |
| 131 | </div> |
| 132 |