about-us
2 days ago
partials
2 days ago
passkeys
2 days ago
policies
2 days ago
reports
2 days ago
support
2 days ago
customize-code-page.php
2 days ago
customize-setup-wizard.php
2 days ago
customize-user-profile.php
2 days ago
customize-user-prompts.php
2 days ago
email-settings.php
2 days ago
general-settings.php
2 days ago
generic-settings.php
2 days ago
import-export.php
2 days ago
index.php
2 days ago
plugins-integrations.php
2 days ago
providers-integrations.php
2 days ago
sidebar.php
2 days ago
white-labeling.php
2 days ago
customize-setup-wizard.php
1533 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Settings Template |
| 4 | * |
| 5 | * @package wp-2fa |
| 6 | */ |
| 7 | |
| 8 | use WP2FA\WP2FA; |
| 9 | use WP2FA\Admin\Settings_Builder; |
| 10 | |
| 11 | ?> |
| 12 | <div class="settings-page" id="customize-setup-wizard-wrap"> |
| 13 | |
| 14 | <?php |
| 15 | Settings_Builder::build_option( |
| 16 | array( |
| 17 | 'parent' => \esc_html__( 'White labeling', 'wp-2fa' ), |
| 18 | 'type' => 'breadcrumb', |
| 19 | 'custom_class' => 'back-policies-settings-main-wrapper', |
| 20 | 'default' => \esc_html__( 'Customize 2FA setup wizard', 'wp-2fa' ), |
| 21 | ) |
| 22 | ); |
| 23 | Settings_Builder::build_option( |
| 24 | array( |
| 25 | 'title' => esc_html__( 'Customize 2FA setup wizard', 'wp-2fa' ), |
| 26 | 'id' => 'wp-2fa-setup-wizard-settings-tab', |
| 27 | 'type' => 'tab-title', |
| 28 | ) |
| 29 | ); |
| 30 | |
| 31 | Settings_Builder::build_option( |
| 32 | array( |
| 33 | 'text' => \wp_sprintf( |
| 34 | // translators: 1. Link to documentation, 2. Link to support. |
| 35 | \esc_html__( 'Customize the messages and styling of the 2FA setup wizard. %1$s.', 'wp-2fa' ), |
| 36 | \wp_sprintf( '<a href="%s" target="_blank">%s</a>', 'https://melapress.com/support/?utm_source=plugin&utm_medium=wp2fa&utm_campaign=setup_wizard_settings_doc', \esc_html__( 'Learn more', 'wp-2fa' ) ) |
| 37 | ), |
| 38 | 'class' => 'description-settings-card', |
| 39 | 'id' => 'wp-2fa-setup-wizard-settings-tab', |
| 40 | 'type' => 'description', |
| 41 | ) |
| 42 | ); |
| 43 | |
| 44 | Settings_Builder::build_option( |
| 45 | array( |
| 46 | 'class' => 'description-settings-card', |
| 47 | 'id' => 'wp-2fa-setup-wizard-settings-tab', |
| 48 | 'type' => 'tabbed-navigation', |
| 49 | 'option_name' => 'wp-2fa-setup-wizard-settings-tabs', |
| 50 | 'values' => array( |
| 51 | array( |
| 52 | 'id' => 'welcome-message', |
| 53 | 'title' => \esc_html__( 'Welcome Message', 'wp-2fa' ), |
| 54 | ), |
| 55 | array( |
| 56 | 'id' => 'wp-2fa-setup-settings', |
| 57 | 'title' => \esc_html__( '2FA Setup', 'wp-2fa' ), |
| 58 | ), |
| 59 | array( |
| 60 | 'id' => 'backup-method', |
| 61 | 'title' => \esc_html__( 'Backup Method', 'wp-2fa' ), |
| 62 | ), |
| 63 | array( |
| 64 | 'id' => 'reconfiguration', |
| 65 | 'title' => \esc_html__( 'Reconfiguration', 'wp-2fa' ), |
| 66 | ), |
| 67 | array( |
| 68 | 'id' => 'customize-styles', |
| 69 | 'title' => \esc_html__( 'Customize Styles', 'wp-2fa' ), |
| 70 | ), |
| 71 | ), |
| 72 | ) |
| 73 | ); |
| 74 | ?> |
| 75 | |
| 76 | <!-- ══════════════════════════════════════════════════════ |
| 77 | TAB 1 — Welcome Message |
| 78 | ══════════════════════════════════════════════════════════ --> |
| 79 | <div class="tab-panel tab-panel-welcome-message"> |
| 80 | |
| 81 | <div class="settings-card"> |
| 82 | <?php |
| 83 | |
| 84 | Settings_Builder::build_option( |
| 85 | array( |
| 86 | 'title' => esc_html__( 'Welcome, initial and generic messages', 'wp-2fa' ), |
| 87 | 'id' => 'general-settings-tab', |
| 88 | 'type' => 'section-title', |
| 89 | ) |
| 90 | ); |
| 91 | |
| 92 | Settings_Builder::build_option( |
| 93 | array( |
| 94 | 'text' => \wp_sprintf( |
| 95 | // translators: 1. Link to documentation, 2. Link to support. |
| 96 | \esc_html__( 'You can add an extra slide at the start of the 2FA setup wizard. It will be the first slide users see when they launch the wizard to set up 2FA for their account. %1$s', 'wp-2fa' ), |
| 97 | \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' ) ) |
| 98 | ), |
| 99 | 'class' => 'description-settings-card', |
| 100 | 'id' => 'general-settings-tab', |
| 101 | 'type' => 'description', |
| 102 | ) |
| 103 | ); |
| 104 | ?> |
| 105 | |
| 106 | <div class="form-group settings-row"> |
| 107 | <?php |
| 108 | Settings_Builder::build_option( |
| 109 | array( |
| 110 | 'text' => \esc_html__( 'Enable "Welcome & initial message"', 'wp-2fa' ), |
| 111 | 'id' => 'welcome-label', |
| 112 | 'type' => 'settings-label', |
| 113 | ) |
| 114 | ); |
| 115 | ?> |
| 116 | <div class="settings-control"> |
| 117 | <?php |
| 118 | Settings_Builder::build_option( |
| 119 | array( |
| 120 | 'id' => 'enable_welcome', |
| 121 | 'value' => 'enable_welcome', |
| 122 | 'type' => 'checkbox', |
| 123 | 'text' => \esc_html__( 'Enable to display optional welcome message.', 'wp-2fa' ), |
| 124 | 'option_name' => 'wp_2fa_white_label[enable_welcome]', |
| 125 | 'not_bool' => true, |
| 126 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'enable_welcome', true ), |
| 127 | ) |
| 128 | ); |
| 129 | ?> |
| 130 | </div> |
| 131 | </div> |
| 132 | |
| 133 | <div class="form-group settings-row"> |
| 134 | <div class="settings-label-group"> |
| 135 | <?php |
| 136 | Settings_Builder::build_option( |
| 137 | array( |
| 138 | 'text' => \esc_html__( 'Optional welcome content', 'wp-2fa' ), |
| 139 | 'id' => 'welcome-content-label', |
| 140 | 'type' => 'settings-label', |
| 141 | ) |
| 142 | ); |
| 143 | |
| 144 | Settings_Builder::build_option( |
| 145 | array( |
| 146 | 'text' => \esc_html__( 'Use the below editor to enter the text that is to be used in the first slide.', 'wp-2fa' ), |
| 147 | 'class' => 'description-settings-card', |
| 148 | 'id' => 'welcome-content-desc', |
| 149 | 'type' => 'description', |
| 150 | ) |
| 151 | ); |
| 152 | ?> |
| 153 | </div> |
| 154 | <div class="settings-control"> |
| 155 | <?php |
| 156 | Settings_Builder::build_option( |
| 157 | array( |
| 158 | 'id' => 'welcome', |
| 159 | 'type' => 'editor', |
| 160 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 161 | 'option_name' => 'wp_2fa_white_label[welcome]', |
| 162 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'welcome', true ), |
| 163 | ) |
| 164 | ); |
| 165 | ?> |
| 166 | </div> |
| 167 | </div> |
| 168 | </div><!-- /.settings-card --> |
| 169 | |
| 170 | <div class="settings-card"> |
| 171 | <?php |
| 172 | Settings_Builder::build_option( |
| 173 | array( |
| 174 | 'title' => esc_html__( 'Other generic wizard steps', 'wp-2fa' ), |
| 175 | 'id' => 'generic-wizard-steps-title', |
| 176 | 'type' => 'section-title', |
| 177 | ) |
| 178 | ); |
| 179 | ?> |
| 180 | |
| 181 | <div class="form-group settings-row"> |
| 182 | <div class="settings-label-group"> |
| 183 | <?php |
| 184 | Settings_Builder::build_option( |
| 185 | array( |
| 186 | 'text' => \esc_html__( 'Prompt when user tries to cancel the wizard', 'wp-2fa' ), |
| 187 | 'id' => 'cancel-wizard-label', |
| 188 | 'type' => 'settings-label', |
| 189 | ) |
| 190 | ); |
| 191 | |
| 192 | Settings_Builder::build_option( |
| 193 | array( |
| 194 | 'text' => \esc_html__( 'Use the below editor to enter the text that is to be used when user closes/cancels the wizard.', 'wp-2fa' ), |
| 195 | 'class' => 'description-settings-card', |
| 196 | 'id' => 'cancel-wizard-desc', |
| 197 | 'type' => 'description', |
| 198 | ) |
| 199 | ); |
| 200 | ?> |
| 201 | </div> |
| 202 | <div class="settings-control"> |
| 203 | <?php |
| 204 | Settings_Builder::build_option( |
| 205 | array( |
| 206 | 'id' => 'wp-2fa_wizard_cancel', |
| 207 | 'type' => 'editor', |
| 208 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 209 | 'option_name' => 'wp_2fa_white_label[wp-2fa_wizard_cancel]', |
| 210 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'wp-2fa_wizard_cancel', true ), |
| 211 | ) |
| 212 | ); |
| 213 | ?> |
| 214 | </div> |
| 215 | </div> |
| 216 | |
| 217 | <div class="form-group settings-row"> |
| 218 | <div class="settings-label-group"> |
| 219 | <?php |
| 220 | Settings_Builder::build_option( |
| 221 | array( |
| 222 | 'text' => \esc_html__( 'Wizard completion – Backup codes not available', 'wp-2fa' ), |
| 223 | 'id' => 'backup-codes-intro-label', |
| 224 | 'type' => 'settings-label', |
| 225 | ) |
| 226 | ); |
| 227 | |
| 228 | Settings_Builder::build_option( |
| 229 | array( |
| 230 | 'text' => \esc_html__( 'This message is shown to users when setup is complete and backup codes are not available.', 'wp-2fa' ), |
| 231 | 'class' => 'description-settings-card', |
| 232 | 'id' => 'backup-codes-intro-desc', |
| 233 | 'type' => 'description', |
| 234 | ) |
| 235 | ); |
| 236 | ?> |
| 237 | </div> |
| 238 | <div class="settings-control"> |
| 239 | <?php |
| 240 | Settings_Builder::build_option( |
| 241 | array( |
| 242 | 'id' => 'backup_codes_intro', |
| 243 | 'type' => 'editor', |
| 244 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 245 | 'option_name' => 'wp_2fa_white_label[backup_codes_intro]', |
| 246 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'backup_codes_intro', true ), |
| 247 | ) |
| 248 | ); |
| 249 | ?> |
| 250 | </div> |
| 251 | </div> |
| 252 | |
| 253 | </div><!-- /.settings-card --> |
| 254 | </div><!-- /.tab-panel-welcome-message --> |
| 255 | |
| 256 | <!-- ══════════════════════════════════════════════════════ |
| 257 | TAB 2 — 2FA Setup |
| 258 | ══════════════════════════════════════════════════════════ --> |
| 259 | <div class="tab-panel tab-panel-wp-2fa-setup-settings"> |
| 260 | |
| 261 | <div class="settings-card"> |
| 262 | <?php |
| 263 | |
| 264 | Settings_Builder::build_option( |
| 265 | array( |
| 266 | 'title' => \esc_html__( 'Customize 2FA Setup labels and messages', 'wp-2fa' ), |
| 267 | 'id' => 'general-settings-tab', |
| 268 | 'type' => 'section-title', |
| 269 | ) |
| 270 | ); |
| 271 | |
| 272 | Settings_Builder::build_option( |
| 273 | array( |
| 274 | 'text' => \wp_sprintf( |
| 275 | \esc_html__( 'Customize the labels and messages shown during the 2FA setup flow. %1$s', 'wp-2fa' ), |
| 276 | \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' ) ) |
| 277 | ), |
| 278 | 'class' => 'description-settings-card', |
| 279 | 'id' => 'general-settings-tab', |
| 280 | 'type' => 'description', |
| 281 | ) |
| 282 | ); |
| 283 | ?> |
| 284 | |
| 285 | <div class="settings-card"> |
| 286 | <!-- Providers List --> |
| 287 | <div class="providers-container"> |
| 288 | <div class="provider-item"> |
| 289 | <div class="provider-summary" onclick="toggleProvider(this)"> |
| 290 | <span class="provider-name"><?php echo \esc_html__( 'General Labels', 'wp-2fa' ); ?></span> |
| 291 | <span class="provider-arrow" aria-hidden="true"></span> |
| 292 | </div> |
| 293 | <div class="provider-content"> |
| 294 | |
| 295 | <!-- <div class="form-group settings-row"> |
| 296 | <div class="settings-label-group"> |
| 297 | <?php |
| 298 | // Settings_Builder::build_option( |
| 299 | // array( |
| 300 | // 'text' => \esc_html__( '2FA required', 'wp-2fa' ), |
| 301 | // 'id' => 'wp-2fa-required-label', |
| 302 | // 'type' => 'settings-label', |
| 303 | // ) |
| 304 | // ); |
| 305 | |
| 306 | // Settings_Builder::build_option( |
| 307 | // array( |
| 308 | // 'text' => \esc_html__( 'This message is shown to users when logging in when 2FA is required.', 'wp-2fa' ), |
| 309 | // 'class' => 'description-settings-card', |
| 310 | // 'type' => 'description', |
| 311 | // ) |
| 312 | // ); |
| 313 | ?> |
| 314 | </div> |
| 315 | <div class="settings-control"> |
| 316 | <?php |
| 317 | // Settings_Builder::build_option( |
| 318 | // array( |
| 319 | // 'id' => 'wp-2fa_required_intro', |
| 320 | // 'type' => 'editor', |
| 321 | // 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 322 | // 'option_name' => 'wp_2fa_white_label[wp-2fa_required_intro]', |
| 323 | // 'default' => WP2FA::get_wp2fa_white_label_setting( 'wp-2fa_required_intro', true ), |
| 324 | // ) |
| 325 | // ); |
| 326 | ?> |
| 327 | </div> |
| 328 | </div> --> |
| 329 | |
| 330 | <div class="form-group settings-row"> |
| 331 | <div class="settings-label-group"> |
| 332 | <?php |
| 333 | Settings_Builder::build_option( |
| 334 | array( |
| 335 | 'text' => \esc_html__( '2FA method selection', 'wp-2fa' ), |
| 336 | 'id' => 'wp-2fa-required-label', |
| 337 | 'type' => 'settings-label', |
| 338 | ) |
| 339 | ); |
| 340 | |
| 341 | Settings_Builder::build_option( |
| 342 | array( |
| 343 | 'text' => \esc_html__( 'This message is shown to users when configuring 2FA with no previous configuration.', 'wp-2fa' ), |
| 344 | 'class' => 'description-settings-card', |
| 345 | 'type' => 'description', |
| 346 | ) |
| 347 | ); |
| 348 | ?> |
| 349 | <span class="extra-text"><?php echo '<strong>{available_methods_count}</strong> <i>'. \esc_html__( 'this displays the number of 2FA methods available.', 'wp-2fa' ).'</i>'; ?></span> |
| 350 | </div> |
| 351 | <div class="settings-control"> |
| 352 | <?php |
| 353 | Settings_Builder::build_option( |
| 354 | array( |
| 355 | 'id' => 'method_selection', |
| 356 | 'type' => 'editor', |
| 357 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 358 | 'option_name' => 'wp_2fa_white_label[method_selection]', |
| 359 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'method_selection', true ), |
| 360 | ) |
| 361 | ); |
| 362 | ?> |
| 363 | </div> |
| 364 | </div> |
| 365 | |
| 366 | </div> |
| 367 | </div> |
| 368 | </div> |
| 369 | </div> |
| 370 | </div> |
| 371 | |
| 372 | <div class="settings-card"> |
| 373 | <?php |
| 374 | |
| 375 | Settings_Builder::build_option( |
| 376 | array( |
| 377 | 'title' => esc_html__( 'Method selection label', 'wp-2fa' ), |
| 378 | 'id' => 'general-settings-tab', |
| 379 | 'type' => 'section-title', |
| 380 | ) |
| 381 | ); |
| 382 | |
| 383 | Settings_Builder::build_option( |
| 384 | array( |
| 385 | 'text' => \wp_sprintf( |
| 386 | // translators: 1. Link to documentation, 2. Link to support. |
| 387 | \esc_html__( 'Customize the label shown for each method on the 2FA method-selection screen.', 'wp-2fa' ), |
| 388 | ), |
| 389 | 'class' => 'description-settings-card', |
| 390 | 'id' => 'general-settings-tab', |
| 391 | 'type' => 'description', |
| 392 | ) |
| 393 | ); |
| 394 | |
| 395 | $integration_providers = \apply_filters( WP_2FA_PREFIX . 'providers_settings_labels', array() ); |
| 396 | |
| 397 | ?> |
| 398 | <div class="settings-card"> |
| 399 | |
| 400 | <!-- Providers List --> |
| 401 | <div class="providers-container"> |
| 402 | <?php |
| 403 | foreach ( $integration_providers as $provider_key => $provider ) { |
| 404 | ?> |
| 405 | <div class="provider-item"> |
| 406 | <div class="provider-summary" onclick="toggleProvider(this)"> |
| 407 | <span class="provider-name"><?php echo esc_html( $provider['provider_name'] ); ?></span> |
| 408 | <span class="provider-arrow" aria-hidden="true"></span> |
| 409 | </div> |
| 410 | <div class="provider-content"> |
| 411 | <?php |
| 412 | if ( isset( $provider['content'] ) ) { |
| 413 | echo $provider['content']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 414 | } |
| 415 | ?> |
| 416 | </div> |
| 417 | </div> |
| 418 | <?php |
| 419 | } |
| 420 | ?> |
| 421 | </div> |
| 422 | </div> |
| 423 | |
| 424 | </div> |
| 425 | </div><!-- /.tab-panel-wp-2fa-setup-settings --> |
| 426 | |
| 427 | <!-- ══════════════════════════════════════════════════════ |
| 428 | TAB 3 — Backup Method |
| 429 | ══════════════════════════════════════════════════════════ --> |
| 430 | <div class="tab-panel tab-panel-backup-method"> |
| 431 | |
| 432 | <div class="settings-card"> |
| 433 | <?php |
| 434 | |
| 435 | Settings_Builder::build_option( |
| 436 | array( |
| 437 | 'title' => esc_html__( 'Backup 2FA methods & final steps', 'wp-2fa' ), |
| 438 | 'id' => 'backup-method-settings-tab', |
| 439 | 'type' => 'section-title', |
| 440 | ) |
| 441 | ); |
| 442 | |
| 443 | Settings_Builder::build_option( |
| 444 | array( |
| 445 | 'text' => \esc_html__( 'Here you can customize the messages shown to users once setup is complete.', 'wp-2fa' ), |
| 446 | 'class' => 'description-settings-card', |
| 447 | 'id' => 'backup-method-settings-tab', |
| 448 | 'type' => 'description', |
| 449 | ) |
| 450 | ); |
| 451 | ?> |
| 452 | |
| 453 | <div class="form-group settings-row"> |
| 454 | <div class="settings-label-group"> |
| 455 | <?php |
| 456 | Settings_Builder::build_option( |
| 457 | array( |
| 458 | 'text' => \esc_html__( 'Choose backup method', 'wp-2fa' ), |
| 459 | 'id' => 'backup-codes-intro-multi-label', |
| 460 | 'type' => 'settings-label', |
| 461 | ) |
| 462 | ); |
| 463 | |
| 464 | Settings_Builder::build_option( |
| 465 | array( |
| 466 | 'text' => \esc_html__( 'This message is shown to users when more than one backup method is available.', 'wp-2fa' ), |
| 467 | 'class' => 'description-settings-card', |
| 468 | 'id' => 'backup-codes-intro-multi-desc', |
| 469 | 'type' => 'description', |
| 470 | ) |
| 471 | ); |
| 472 | ?> |
| 473 | </div> |
| 474 | <div class="settings-control"> |
| 475 | <?php |
| 476 | Settings_Builder::build_option( |
| 477 | array( |
| 478 | 'id' => 'backup_codes_intro_multi', |
| 479 | 'type' => 'editor', |
| 480 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 481 | 'option_name' => 'wp_2fa_white_label[backup_codes_intro_multi]', |
| 482 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'backup_codes_intro_multi', true ), |
| 483 | ) |
| 484 | ); |
| 485 | ?> |
| 486 | </div> |
| 487 | </div> |
| 488 | |
| 489 | <div class="form-group settings-row"> |
| 490 | <div class="settings-label-group"> |
| 491 | <?php |
| 492 | Settings_Builder::build_option( |
| 493 | array( |
| 494 | 'text' => \esc_html__( 'Wizard completion – Backup codes optional', 'wp-2fa' ), |
| 495 | 'id' => 'backup-codes-intro-continue-label', |
| 496 | 'type' => 'settings-label', |
| 497 | ) |
| 498 | ); |
| 499 | |
| 500 | Settings_Builder::build_option( |
| 501 | array( |
| 502 | 'text' => \esc_html__( 'This message is shown to users when setup is complete and backup codes are optional.', 'wp-2fa' ), |
| 503 | 'class' => 'description-settings-card', |
| 504 | 'id' => 'backup-codes-intro-continue-desc', |
| 505 | 'type' => 'description', |
| 506 | ) |
| 507 | ); |
| 508 | ?> |
| 509 | </div> |
| 510 | <div class="settings-control"> |
| 511 | <?php |
| 512 | Settings_Builder::build_option( |
| 513 | array( |
| 514 | 'id' => 'backup_codes_intro_continue', |
| 515 | 'type' => 'editor', |
| 516 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 517 | 'option_name' => 'wp_2fa_white_label[backup_codes_intro_continue]', |
| 518 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'backup_codes_intro_continue', true ), |
| 519 | ) |
| 520 | ); |
| 521 | ?> |
| 522 | </div> |
| 523 | </div> |
| 524 | |
| 525 | <div class="form-group settings-row"> |
| 526 | <div class="settings-label-group"> |
| 527 | <?php |
| 528 | Settings_Builder::build_option( |
| 529 | array( |
| 530 | 'text' => \esc_html__( 'Backup email intro', 'wp-2fa' ), |
| 531 | 'id' => 'backup-email-intro-label', |
| 532 | 'type' => 'settings-label', |
| 533 | ) |
| 534 | ); |
| 535 | |
| 536 | Settings_Builder::build_option( |
| 537 | array( |
| 538 | 'text' => \esc_html__( 'This message is shown to users when email 2FA backup is available.', 'wp-2fa' ), |
| 539 | 'class' => 'description-settings-card', |
| 540 | 'id' => 'backup-email-intro-desc', |
| 541 | 'type' => 'description', |
| 542 | ) |
| 543 | ); |
| 544 | ?> |
| 545 | </div> |
| 546 | <div class="settings-control"> |
| 547 | <?php |
| 548 | Settings_Builder::build_option( |
| 549 | array( |
| 550 | 'id' => 'backup_email_intro', |
| 551 | 'type' => 'editor', |
| 552 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 553 | 'option_name' => 'wp_2fa_white_label[backup_email_intro]', |
| 554 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'backup_email_intro', true ), |
| 555 | ) |
| 556 | ); |
| 557 | ?> |
| 558 | </div> |
| 559 | </div> |
| 560 | </div><!-- /.settings-card --> |
| 561 | |
| 562 | <div class="settings-card"> |
| 563 | <?php |
| 564 | |
| 565 | Settings_Builder::build_option( |
| 566 | array( |
| 567 | 'title' => esc_html__( 'Backup codes generation', 'wp-2fa' ), |
| 568 | 'id' => 'backup-codes-generation-tab', |
| 569 | 'type' => 'section-title', |
| 570 | ) |
| 571 | ); |
| 572 | ?> |
| 573 | |
| 574 | <div class="form-group settings-row"> |
| 575 | <div class="settings-label-group"> |
| 576 | <?php |
| 577 | Settings_Builder::build_option( |
| 578 | array( |
| 579 | 'text' => \esc_html__( 'Backup codes generation intro', 'wp-2fa' ), |
| 580 | 'id' => 'backup-codes-generate-intro-label', |
| 581 | 'type' => 'settings-label', |
| 582 | ) |
| 583 | ); |
| 584 | |
| 585 | Settings_Builder::build_option( |
| 586 | array( |
| 587 | 'text' => \esc_html__( 'This message is shown to users prior to generation of backup codes.', 'wp-2fa' ), |
| 588 | 'class' => 'description-settings-card', |
| 589 | 'id' => 'backup-codes-generate-intro-desc', |
| 590 | 'type' => 'description', |
| 591 | ) |
| 592 | ); |
| 593 | ?> |
| 594 | </div> |
| 595 | <div class="settings-control"> |
| 596 | <?php |
| 597 | Settings_Builder::build_option( |
| 598 | array( |
| 599 | 'id' => 'backup_codes_generate_intro', |
| 600 | 'type' => 'editor', |
| 601 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 602 | 'option_name' => 'wp_2fa_white_label[backup_codes_generate_intro]', |
| 603 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'backup_codes_generate_intro', true ), |
| 604 | ) |
| 605 | ); |
| 606 | ?> |
| 607 | </div> |
| 608 | </div> |
| 609 | |
| 610 | <div class="form-group settings-row"> |
| 611 | <div class="settings-label-group"> |
| 612 | <?php |
| 613 | Settings_Builder::build_option( |
| 614 | array( |
| 615 | 'text' => \esc_html__( 'Backup codes generated', 'wp-2fa' ), |
| 616 | 'id' => 'backup-codes-generated-label', |
| 617 | 'type' => 'settings-label', |
| 618 | ) |
| 619 | ); |
| 620 | |
| 621 | Settings_Builder::build_option( |
| 622 | array( |
| 623 | 'text' => \esc_html__( 'This message is shown to users when backup codes have been generated.', 'wp-2fa' ), |
| 624 | 'class' => 'description-settings-card', |
| 625 | 'id' => 'backup-codes-generated-desc', |
| 626 | 'type' => 'description', |
| 627 | ) |
| 628 | ); |
| 629 | ?> |
| 630 | </div> |
| 631 | <div class="settings-control"> |
| 632 | <?php |
| 633 | Settings_Builder::build_option( |
| 634 | array( |
| 635 | 'id' => 'backup_codes_generated', |
| 636 | 'type' => 'editor', |
| 637 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 638 | 'option_name' => 'wp_2fa_white_label[backup_codes_generated]', |
| 639 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'backup_codes_generated', true ), |
| 640 | ) |
| 641 | ); |
| 642 | ?> |
| 643 | </div> |
| 644 | </div> |
| 645 | |
| 646 | <div class="form-group settings-row"> |
| 647 | <div class="settings-label-group"> |
| 648 | <?php |
| 649 | Settings_Builder::build_option( |
| 650 | array( |
| 651 | 'text' => \esc_html__( 'Backup email radio select option', 'wp-2fa' ), |
| 652 | 'id' => 'backup-email-select-method-label', |
| 653 | 'type' => 'settings-label', |
| 654 | ) |
| 655 | ); |
| 656 | |
| 657 | Settings_Builder::build_option( |
| 658 | array( |
| 659 | 'text' => \esc_html__( 'This message is shown to users when backup email method is shown for selection.', 'wp-2fa' ), |
| 660 | 'class' => 'description-settings-card', |
| 661 | 'id' => 'backup-email-select-method-desc', |
| 662 | 'type' => 'description', |
| 663 | ) |
| 664 | ); |
| 665 | ?> |
| 666 | </div> |
| 667 | <div class="settings-control"> |
| 668 | <?php |
| 669 | Settings_Builder::build_option( |
| 670 | array( |
| 671 | 'id' => 'backup-email-select-method', |
| 672 | 'type' => 'editor', |
| 673 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 674 | 'option_name' => 'wp_2fa_white_label[backup-email-select-method]', |
| 675 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'backup-email-select-method', true ), |
| 676 | ) |
| 677 | ); |
| 678 | ?> |
| 679 | </div> |
| 680 | </div> |
| 681 | |
| 682 | <div class="form-group settings-row"> |
| 683 | <div class="settings-label-group"> |
| 684 | <?php |
| 685 | Settings_Builder::build_option( |
| 686 | array( |
| 687 | 'text' => \esc_html__( 'Backup code radio select option', 'wp-2fa' ), |
| 688 | 'id' => 'backup-codes-select-method-label', |
| 689 | 'type' => 'settings-label', |
| 690 | ) |
| 691 | ); |
| 692 | |
| 693 | Settings_Builder::build_option( |
| 694 | array( |
| 695 | 'text' => \esc_html__( 'This message is shown to users when backup code method is shown for selection.', 'wp-2fa' ), |
| 696 | 'class' => 'description-settings-card', |
| 697 | 'id' => 'backup-codes-select-method-desc', |
| 698 | 'type' => 'description', |
| 699 | ) |
| 700 | ); |
| 701 | ?> |
| 702 | </div> |
| 703 | <div class="settings-control"> |
| 704 | <?php |
| 705 | Settings_Builder::build_option( |
| 706 | array( |
| 707 | 'id' => 'backup_codes-select-method', |
| 708 | 'type' => 'editor', |
| 709 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 710 | 'option_name' => 'wp_2fa_white_label[backup_codes-select-method]', |
| 711 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'backup_codes-select-method', true ), |
| 712 | ) |
| 713 | ); |
| 714 | ?> |
| 715 | </div> |
| 716 | </div> |
| 717 | |
| 718 | <div class="form-group settings-row"> |
| 719 | <div class="settings-label-group"> |
| 720 | <?php |
| 721 | Settings_Builder::build_option( |
| 722 | array( |
| 723 | 'text' => \esc_html__( 'Backup codes learn more link', 'wp-2fa' ), |
| 724 | 'id' => 'backup-codes-learn-more-label', |
| 725 | 'type' => 'settings-label', |
| 726 | ) |
| 727 | ); |
| 728 | |
| 729 | Settings_Builder::build_option( |
| 730 | array( |
| 731 | 'text' => \esc_html__( 'This link is shown to users next to the "Generate list of backup codes" button when no backup codes are available.', 'wp-2fa' ), |
| 732 | 'class' => 'description-settings-card', |
| 733 | 'id' => 'backup-codes-learn-more-desc', |
| 734 | 'type' => 'description', |
| 735 | ) |
| 736 | ); |
| 737 | ?> |
| 738 | </div> |
| 739 | <div class="settings-control"> |
| 740 | <?php |
| 741 | Settings_Builder::build_option( |
| 742 | array( |
| 743 | 'id' => 'backup_codes_learn_more', |
| 744 | 'type' => 'editor', |
| 745 | 'placeholder' => \esc_html__( 'Enter custom link HTML', 'wp-2fa' ), |
| 746 | 'option_name' => 'wp_2fa_white_label[backup_codes_learn_more]', |
| 747 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'backup_codes_learn_more', true ), |
| 748 | ) |
| 749 | ); |
| 750 | ?> |
| 751 | </div> |
| 752 | </div> |
| 753 | </div><!-- /.settings-card --> |
| 754 | |
| 755 | <div class="settings-card"> |
| 756 | <?php |
| 757 | |
| 758 | Settings_Builder::build_option( |
| 759 | array( |
| 760 | 'title' => esc_html__( 'Wizard completion', 'wp-2fa' ), |
| 761 | 'id' => 'backup-wizard-completion-tab', |
| 762 | 'type' => 'section-title', |
| 763 | ) |
| 764 | ); |
| 765 | ?> |
| 766 | |
| 767 | <div class="form-group settings-row"> |
| 768 | <div class="settings-label-group"> |
| 769 | <?php |
| 770 | Settings_Builder::build_option( |
| 771 | array( |
| 772 | 'text' => \esc_html__( 'Wizard completion', 'wp-2fa' ), |
| 773 | 'id' => 'no-further-action-label', |
| 774 | 'type' => 'settings-label', |
| 775 | ) |
| 776 | ); |
| 777 | |
| 778 | Settings_Builder::build_option( |
| 779 | array( |
| 780 | 'text' => \esc_html__( 'This message is shown to users when 2FA has been configured and no further actions are available.', 'wp-2fa' ), |
| 781 | 'class' => 'description-settings-card', |
| 782 | 'id' => 'no-further-action-desc', |
| 783 | 'type' => 'description', |
| 784 | ) |
| 785 | ); |
| 786 | ?> |
| 787 | </div> |
| 788 | <div class="settings-control"> |
| 789 | <?php |
| 790 | Settings_Builder::build_option( |
| 791 | array( |
| 792 | 'id' => 'no_further_action', |
| 793 | 'type' => 'editor', |
| 794 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 795 | 'option_name' => 'wp_2fa_white_label[no_further_action]', |
| 796 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'no_further_action', true ), |
| 797 | ) |
| 798 | ); |
| 799 | ?> |
| 800 | </div> |
| 801 | </div> |
| 802 | </div><!-- /.settings-card --> |
| 803 | </div><!-- /.tab-panel-backup-method --> |
| 804 | |
| 805 | |
| 806 | <!-- ══════════════════════════════════════════════════════ |
| 807 | TAB 4 — Reconfiguration |
| 808 | ══════════════════════════════════════════════════════════ --> |
| 809 | <div class="tab-panel tab-panel-reconfiguration"> |
| 810 | |
| 811 | <div class="settings-card"> |
| 812 | <?php |
| 813 | |
| 814 | Settings_Builder::build_option( |
| 815 | array( |
| 816 | 'title' => esc_html__( '2FA method reconfiguration', 'wp-2fa' ), |
| 817 | 'id' => 'reconfiguration-settings-tab', |
| 818 | 'type' => 'section-title', |
| 819 | ) |
| 820 | ); |
| 821 | |
| 822 | Settings_Builder::build_option( |
| 823 | array( |
| 824 | 'text' => \esc_html__( 'From here you can customize the wizard text shown to users when they already have 2FA configured and they want to reconfigure 2FA from their user profile page.', 'wp-2fa' ), |
| 825 | 'class' => 'description-settings-card', |
| 826 | 'id' => 'reconfiguration-settings-tab', |
| 827 | 'type' => 'description', |
| 828 | ) |
| 829 | ); |
| 830 | ?> |
| 831 | |
| 832 | <div class="form-group settings-row"> |
| 833 | <div class="settings-label-group"> |
| 834 | <?php |
| 835 | Settings_Builder::build_option( |
| 836 | array( |
| 837 | 'text' => \wp_sprintf( |
| 838 | // translators: Method option label. |
| 839 | \esc_html__( 'Reconfigure %s intro', 'wp-2fa' ), |
| 840 | WP2FA::get_wp2fa_white_label_setting( 'totp-option-label', true ) |
| 841 | ), |
| 842 | 'id' => 'totp-reconfigure-intro-label', |
| 843 | 'type' => 'settings-label', |
| 844 | ) |
| 845 | ); |
| 846 | |
| 847 | Settings_Builder::build_option( |
| 848 | array( |
| 849 | 'text' => \wp_sprintf( |
| 850 | // translators: Method option label. |
| 851 | \esc_html__( 'This message is shown to users when reconfiguring %s.', 'wp-2fa' ), |
| 852 | WP2FA::get_wp2fa_white_label_setting( 'totp-option-label', true ) |
| 853 | ), |
| 854 | 'class' => 'description-settings-card', |
| 855 | 'type' => 'description', |
| 856 | ) |
| 857 | ); |
| 858 | ?> |
| 859 | </div> |
| 860 | <div class="settings-control"> |
| 861 | <?php |
| 862 | Settings_Builder::build_option( |
| 863 | array( |
| 864 | 'id' => 'totp_reconfigure_intro', |
| 865 | 'type' => 'editor', |
| 866 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 867 | 'option_name' => 'wp_2fa_white_label[totp_reconfigure_intro]', |
| 868 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'totp_reconfigure_intro', true ), |
| 869 | 'legend' => array( 'reconfigure_or_configure_capitalized', 'reconfigure_or_configure' ), |
| 870 | ) |
| 871 | ); |
| 872 | ?> |
| 873 | </div> |
| 874 | </div> |
| 875 | |
| 876 | <div class="form-group settings-row"> |
| 877 | <div class="settings-label-group"> |
| 878 | <?php |
| 879 | Settings_Builder::build_option( |
| 880 | array( |
| 881 | 'text' => \wp_sprintf( |
| 882 | // translators: Method option label. |
| 883 | \esc_html__( 'Reconfigure %s intro', 'wp-2fa' ), |
| 884 | WP2FA::get_wp2fa_white_label_setting( 'email-option-label', true ) |
| 885 | ), |
| 886 | 'id' => 'hotp-reconfigure-intro-label', |
| 887 | 'type' => 'settings-label', |
| 888 | ) |
| 889 | ); |
| 890 | |
| 891 | Settings_Builder::build_option( |
| 892 | array( |
| 893 | 'text' => \wp_sprintf( |
| 894 | // translators: Method option label. |
| 895 | \esc_html__( 'This message is shown to users when reconfiguring %s.', 'wp-2fa' ), |
| 896 | WP2FA::get_wp2fa_white_label_setting( 'email-option-label', true ) |
| 897 | ), |
| 898 | 'class' => 'description-settings-card', |
| 899 | 'type' => 'description', |
| 900 | ) |
| 901 | ); |
| 902 | ?> |
| 903 | </div> |
| 904 | <div class="settings-control"> |
| 905 | <?php |
| 906 | Settings_Builder::build_option( |
| 907 | array( |
| 908 | 'id' => 'hotp_reconfigure_intro', |
| 909 | 'type' => 'editor', |
| 910 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 911 | 'option_name' => 'wp_2fa_white_label[hotp_reconfigure_intro]', |
| 912 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'hotp_reconfigure_intro', true ), |
| 913 | 'legend' => array( 'reconfigure_or_configure_capitalized', 'reconfigure_or_configure' ), |
| 914 | ) |
| 915 | ); |
| 916 | ?> |
| 917 | </div> |
| 918 | </div> |
| 919 | |
| 920 | <div class="form-group settings-row"> |
| 921 | <div class="settings-label-group"> |
| 922 | <?php |
| 923 | Settings_Builder::build_option( |
| 924 | array( |
| 925 | 'text' => \esc_html__( 'Reconfigure Authy 2FA service intro', 'wp-2fa' ), |
| 926 | 'id' => 'authy-reconfigure-intro-label', |
| 927 | 'type' => 'settings-label', |
| 928 | ) |
| 929 | ); |
| 930 | |
| 931 | Settings_Builder::build_option( |
| 932 | array( |
| 933 | 'text' => \esc_html__( 'This message is shown to users when reconfiguring Authy 2FA service.', 'wp-2fa' ), |
| 934 | 'class' => 'description-settings-card', |
| 935 | 'type' => 'description', |
| 936 | ) |
| 937 | ); |
| 938 | ?> |
| 939 | </div> |
| 940 | <div class="settings-control"> |
| 941 | <?php |
| 942 | Settings_Builder::build_option( |
| 943 | array( |
| 944 | 'id' => 'authy_reconfigure_intro', |
| 945 | 'type' => 'editor', |
| 946 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 947 | 'option_name' => 'wp_2fa_white_label[authy_reconfigure_intro]', |
| 948 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'authy_reconfigure_intro', true ), |
| 949 | 'legend' => array( 'reconfigure_or_configure_capitalized', 'reconfigure_or_configure' ), |
| 950 | ) |
| 951 | ); |
| 952 | ?> |
| 953 | </div> |
| 954 | </div> |
| 955 | |
| 956 | <div class="form-group settings-row"> |
| 957 | <div class="settings-label-group"> |
| 958 | <?php |
| 959 | Settings_Builder::build_option( |
| 960 | array( |
| 961 | 'text' => \esc_html__( 'Authy – Service unavailable', 'wp-2fa' ), |
| 962 | 'id' => 'authy-reconfigure-intro-unavailable-label', |
| 963 | 'type' => 'settings-label', |
| 964 | ) |
| 965 | ); |
| 966 | |
| 967 | Settings_Builder::build_option( |
| 968 | array( |
| 969 | 'text' => \esc_html__( 'This message is shown to users when reconfiguring Authy 2FA service, but the service is unavailable.', 'wp-2fa' ), |
| 970 | 'class' => 'description-settings-card', |
| 971 | 'type' => 'description', |
| 972 | ) |
| 973 | ); |
| 974 | ?> |
| 975 | </div> |
| 976 | <div class="settings-control"> |
| 977 | <?php |
| 978 | Settings_Builder::build_option( |
| 979 | array( |
| 980 | 'id' => 'authy_reconfigure_intro_unavailable', |
| 981 | 'type' => 'editor', |
| 982 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 983 | 'option_name' => 'wp_2fa_white_label[authy_reconfigure_intro_unavailable]', |
| 984 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'authy_reconfigure_intro_unavailable', true ), |
| 985 | 'legend' => array( 'reconfigure_or_configure_capitalized', 'reconfigure_or_configure' ), |
| 986 | ) |
| 987 | ); |
| 988 | ?> |
| 989 | </div> |
| 990 | </div> |
| 991 | |
| 992 | <div class="form-group settings-row"> |
| 993 | <div class="settings-label-group"> |
| 994 | <?php |
| 995 | Settings_Builder::build_option( |
| 996 | array( |
| 997 | 'text' => \esc_html__( 'Reconfigure Twilio 2FA service intro', 'wp-2fa' ), |
| 998 | 'id' => 'twilio-reconfigure-intro-label', |
| 999 | 'type' => 'settings-label', |
| 1000 | ) |
| 1001 | ); |
| 1002 | |
| 1003 | Settings_Builder::build_option( |
| 1004 | array( |
| 1005 | 'text' => \esc_html__( 'This message is shown to users when reconfiguring Twilio 2FA service.', 'wp-2fa' ), |
| 1006 | 'class' => 'description-settings-card', |
| 1007 | 'type' => 'description', |
| 1008 | ) |
| 1009 | ); |
| 1010 | ?> |
| 1011 | </div> |
| 1012 | <div class="settings-control"> |
| 1013 | <?php |
| 1014 | Settings_Builder::build_option( |
| 1015 | array( |
| 1016 | 'id' => 'twilio_reconfigure_intro', |
| 1017 | 'type' => 'editor', |
| 1018 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 1019 | 'option_name' => 'wp_2fa_white_label[twilio_reconfigure_intro]', |
| 1020 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'twilio_reconfigure_intro', true ), |
| 1021 | 'legend' => array( 'reconfigure_or_configure_capitalized', 'reconfigure_or_configure' ), |
| 1022 | ) |
| 1023 | ); |
| 1024 | ?> |
| 1025 | </div> |
| 1026 | </div> |
| 1027 | |
| 1028 | <div class="form-group settings-row"> |
| 1029 | <div class="settings-label-group"> |
| 1030 | <?php |
| 1031 | Settings_Builder::build_option( |
| 1032 | array( |
| 1033 | 'text' => \esc_html__( 'Twilio – Service unavailable', 'wp-2fa' ), |
| 1034 | 'id' => 'twilio-reconfigure-intro-unavailable-label', |
| 1035 | 'type' => 'settings-label', |
| 1036 | ) |
| 1037 | ); |
| 1038 | |
| 1039 | Settings_Builder::build_option( |
| 1040 | array( |
| 1041 | 'text' => \esc_html__( 'This message is shown to users when reconfiguring Twilio 2FA service, but the SMS service is unavailable.', 'wp-2fa' ), |
| 1042 | 'class' => 'description-settings-card', |
| 1043 | 'type' => 'description', |
| 1044 | ) |
| 1045 | ); |
| 1046 | ?> |
| 1047 | </div> |
| 1048 | <div class="settings-control"> |
| 1049 | <?php |
| 1050 | Settings_Builder::build_option( |
| 1051 | array( |
| 1052 | 'id' => 'twilio_reconfigure_intro_unavailable', |
| 1053 | 'type' => 'editor', |
| 1054 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 1055 | 'option_name' => 'wp_2fa_white_label[twilio_reconfigure_intro_unavailable]', |
| 1056 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'twilio_reconfigure_intro_unavailable', true ), |
| 1057 | 'legend' => array( 'reconfigure_or_configure_capitalized', 'reconfigure_or_configure' ), |
| 1058 | ) |
| 1059 | ); |
| 1060 | ?> |
| 1061 | </div> |
| 1062 | </div> |
| 1063 | |
| 1064 | <div class="form-group settings-row"> |
| 1065 | <div class="settings-label-group"> |
| 1066 | <?php |
| 1067 | Settings_Builder::build_option( |
| 1068 | array( |
| 1069 | 'text' => \esc_html__( 'Reconfigure Clickatell 2FA service intro', 'wp-2fa' ), |
| 1070 | 'id' => 'clickatell-reconfigure-intro-label', |
| 1071 | 'type' => 'settings-label', |
| 1072 | ) |
| 1073 | ); |
| 1074 | |
| 1075 | Settings_Builder::build_option( |
| 1076 | array( |
| 1077 | 'text' => \esc_html__( 'This message is shown to users when reconfiguring Clickatell 2FA service.', 'wp-2fa' ), |
| 1078 | 'class' => 'description-settings-card', |
| 1079 | 'type' => 'description', |
| 1080 | ) |
| 1081 | ); |
| 1082 | ?> |
| 1083 | </div> |
| 1084 | <div class="settings-control"> |
| 1085 | <?php |
| 1086 | Settings_Builder::build_option( |
| 1087 | array( |
| 1088 | 'id' => 'clickatell_reconfigure_intro', |
| 1089 | 'type' => 'editor', |
| 1090 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 1091 | 'option_name' => 'wp_2fa_white_label[clickatell_reconfigure_intro]', |
| 1092 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'clickatell_reconfigure_intro', true ), |
| 1093 | 'legend' => array( 'reconfigure_or_configure_capitalized', 'reconfigure_or_configure' ), |
| 1094 | ) |
| 1095 | ); |
| 1096 | ?> |
| 1097 | </div> |
| 1098 | </div> |
| 1099 | |
| 1100 | <div class="form-group settings-row"> |
| 1101 | <div class="settings-label-group"> |
| 1102 | <?php |
| 1103 | Settings_Builder::build_option( |
| 1104 | array( |
| 1105 | 'text' => \esc_html__( 'Clickatell – Service unavailable', 'wp-2fa' ), |
| 1106 | 'id' => 'clickatell-reconfigure-intro-unavailable-label', |
| 1107 | 'type' => 'settings-label', |
| 1108 | ) |
| 1109 | ); |
| 1110 | |
| 1111 | Settings_Builder::build_option( |
| 1112 | array( |
| 1113 | 'text' => \esc_html__( 'This message is shown to users when reconfiguring Clickatell 2FA service, but the SMS service is unavailable.', 'wp-2fa' ), |
| 1114 | 'class' => 'description-settings-card', |
| 1115 | 'type' => 'description', |
| 1116 | ) |
| 1117 | ); |
| 1118 | ?> |
| 1119 | </div> |
| 1120 | <div class="settings-control"> |
| 1121 | <?php |
| 1122 | Settings_Builder::build_option( |
| 1123 | array( |
| 1124 | 'id' => 'clickatell_reconfigure_intro_unavailable', |
| 1125 | 'type' => 'editor', |
| 1126 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 1127 | 'option_name' => 'wp_2fa_white_label[clickatell_reconfigure_intro_unavailable]', |
| 1128 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'clickatell_reconfigure_intro_unavailable', true ), |
| 1129 | 'legend' => array( 'reconfigure_or_configure_capitalized', 'reconfigure_or_configure' ), |
| 1130 | ) |
| 1131 | ); |
| 1132 | ?> |
| 1133 | </div> |
| 1134 | </div> |
| 1135 | |
| 1136 | <div class="form-group settings-row"> |
| 1137 | <div class="settings-label-group"> |
| 1138 | <?php |
| 1139 | Settings_Builder::build_option( |
| 1140 | array( |
| 1141 | 'text' => \wp_sprintf( |
| 1142 | // translators: Method option label. |
| 1143 | \esc_html__( 'Reconfigure %s intro', 'wp-2fa' ), |
| 1144 | WP2FA::get_wp2fa_white_label_setting( 'oob-option-label', true ) |
| 1145 | ), |
| 1146 | 'id' => 'oob-reconfigure-intro-label', |
| 1147 | 'type' => 'settings-label', |
| 1148 | ) |
| 1149 | ); |
| 1150 | |
| 1151 | Settings_Builder::build_option( |
| 1152 | array( |
| 1153 | 'text' => \wp_sprintf( |
| 1154 | // translators: Method option label. |
| 1155 | \esc_html__( 'This message is shown to users when reconfiguring %s.', 'wp-2fa' ), |
| 1156 | WP2FA::get_wp2fa_white_label_setting( 'oob-option-label', true ) |
| 1157 | ), |
| 1158 | 'class' => 'description-settings-card', |
| 1159 | 'type' => 'description', |
| 1160 | ) |
| 1161 | ); |
| 1162 | ?> |
| 1163 | </div> |
| 1164 | <div class="settings-control"> |
| 1165 | <?php |
| 1166 | Settings_Builder::build_option( |
| 1167 | array( |
| 1168 | 'id' => 'oob_reconfigure_intro', |
| 1169 | 'type' => 'editor', |
| 1170 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 1171 | 'option_name' => 'wp_2fa_white_label[oob_reconfigure_intro]', |
| 1172 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'oob_reconfigure_intro', true ), |
| 1173 | 'legend' => array( 'reconfigure_or_configure_capitalized', 'reconfigure_or_configure' ), |
| 1174 | ) |
| 1175 | ); |
| 1176 | ?> |
| 1177 | </div> |
| 1178 | </div> |
| 1179 | |
| 1180 | <div class="form-group settings-row"> |
| 1181 | <div class="settings-label-group"> |
| 1182 | <?php |
| 1183 | Settings_Builder::build_option( |
| 1184 | array( |
| 1185 | 'text' => \wp_sprintf( |
| 1186 | // translators: Method option label. |
| 1187 | \esc_html__( '%s – Service unavailable', 'wp-2fa' ), |
| 1188 | WP2FA::get_wp2fa_white_label_setting( 'oob-option-label', true ) |
| 1189 | ), |
| 1190 | 'id' => 'oob-reconfigure-intro-unavailable-label', |
| 1191 | 'type' => 'settings-label', |
| 1192 | ) |
| 1193 | ); |
| 1194 | |
| 1195 | Settings_Builder::build_option( |
| 1196 | array( |
| 1197 | 'text' => \wp_sprintf( |
| 1198 | // translators: Method option label. |
| 1199 | \esc_html__( 'This message is shown to users when reconfiguring %s, but the service is unavailable.', 'wp-2fa' ), |
| 1200 | WP2FA::get_wp2fa_white_label_setting( 'oob-option-label', true ) |
| 1201 | ), |
| 1202 | 'class' => 'description-settings-card', |
| 1203 | 'type' => 'description', |
| 1204 | ) |
| 1205 | ); |
| 1206 | ?> |
| 1207 | </div> |
| 1208 | <div class="settings-control"> |
| 1209 | <?php |
| 1210 | Settings_Builder::build_option( |
| 1211 | array( |
| 1212 | 'id' => 'oob_reconfigure_intro_unavailable', |
| 1213 | 'type' => 'editor', |
| 1214 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 1215 | 'option_name' => 'wp_2fa_white_label[oob_reconfigure_intro_unavailable]', |
| 1216 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'oob_reconfigure_intro_unavailable', true ), |
| 1217 | 'legend' => array( 'reconfigure_or_configure_capitalized', 'reconfigure_or_configure' ), |
| 1218 | ) |
| 1219 | ); |
| 1220 | ?> |
| 1221 | </div> |
| 1222 | </div> |
| 1223 | |
| 1224 | <div class="form-group settings-row"> |
| 1225 | <div class="settings-label-group"> |
| 1226 | <?php |
| 1227 | Settings_Builder::build_option( |
| 1228 | array( |
| 1229 | 'text' => \wp_sprintf( |
| 1230 | // translators: Method option label. |
| 1231 | \esc_html__( 'Reconfigure 2FA with %s intro', 'wp-2fa' ), |
| 1232 | WP2FA::get_wp2fa_white_label_setting( 'yubico-option-label', true ) |
| 1233 | ), |
| 1234 | 'id' => 'yubico-reconfigure-intro-label', |
| 1235 | 'type' => 'settings-label', |
| 1236 | ) |
| 1237 | ); |
| 1238 | |
| 1239 | Settings_Builder::build_option( |
| 1240 | array( |
| 1241 | 'text' => \wp_sprintf( |
| 1242 | // translators: Method option label. |
| 1243 | \esc_html__( 'This message is shown to users when configuring or reconfiguring 2FA with %s.', 'wp-2fa' ), |
| 1244 | WP2FA::get_wp2fa_white_label_setting( 'yubico-option-label', true ) |
| 1245 | ), |
| 1246 | 'class' => 'description-settings-card', |
| 1247 | 'type' => 'description', |
| 1248 | ) |
| 1249 | ); |
| 1250 | ?> |
| 1251 | </div> |
| 1252 | <div class="settings-control"> |
| 1253 | <?php |
| 1254 | Settings_Builder::build_option( |
| 1255 | array( |
| 1256 | 'id' => 'yubico_reconfigure_intro', |
| 1257 | 'type' => 'editor', |
| 1258 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 1259 | 'option_name' => 'wp_2fa_white_label[yubico_reconfigure_intro]', |
| 1260 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'yubico_reconfigure_intro', true ), |
| 1261 | 'legend' => array( 'reconfigure_or_configure_capitalized', 'reconfigure_or_configure' ), |
| 1262 | ) |
| 1263 | ); |
| 1264 | ?> |
| 1265 | </div> |
| 1266 | </div> |
| 1267 | |
| 1268 | <div class="form-group settings-row"> |
| 1269 | <div class="settings-label-group"> |
| 1270 | <?php |
| 1271 | Settings_Builder::build_option( |
| 1272 | array( |
| 1273 | 'text' => \esc_html__( 'YubiKey – Service unavailable', 'wp-2fa' ), |
| 1274 | 'id' => 'yubico-reconfigure-intro-unavailable-label', |
| 1275 | 'type' => 'settings-label', |
| 1276 | ) |
| 1277 | ); |
| 1278 | |
| 1279 | Settings_Builder::build_option( |
| 1280 | array( |
| 1281 | 'text' => \esc_html__( 'This message is shown to users when reconfiguring YubiKey 2FA, but the service is unavailable.', 'wp-2fa' ), |
| 1282 | 'class' => 'description-settings-card', |
| 1283 | 'type' => 'description', |
| 1284 | ) |
| 1285 | ); |
| 1286 | ?> |
| 1287 | </div> |
| 1288 | <div class="settings-control"> |
| 1289 | <?php |
| 1290 | Settings_Builder::build_option( |
| 1291 | array( |
| 1292 | 'id' => 'yubico_reconfigure_intro_unavailable', |
| 1293 | 'type' => 'editor', |
| 1294 | 'placeholder' => \esc_html__( 'Enter custom message', 'wp-2fa' ), |
| 1295 | 'option_name' => 'wp_2fa_white_label[yubico_reconfigure_intro_unavailable]', |
| 1296 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'yubico_reconfigure_intro_unavailable', true ), |
| 1297 | 'legend' => array( 'reconfigure_or_configure_capitalized', 'reconfigure_or_configure' ), |
| 1298 | ) |
| 1299 | ); |
| 1300 | ?> |
| 1301 | </div> |
| 1302 | </div> |
| 1303 | </div><!-- /.settings-card --> |
| 1304 | </div><!-- /.tab-panel-reconfiguration --> |
| 1305 | |
| 1306 | <!-- ══════════════════════════════════════════════════════ |
| 1307 | TAB 5 — Customize Styles |
| 1308 | ══════════════════════════════════════════════════════════ --> |
| 1309 | <div class="tab-panel tab-panel-customize-styles"> |
| 1310 | |
| 1311 | <div class="settings-card"> |
| 1312 | <?php |
| 1313 | |
| 1314 | Settings_Builder::build_option( |
| 1315 | array( |
| 1316 | 'title' => esc_html__( 'Change the styling of the user 2FA wizards', 'wp-2fa' ), |
| 1317 | 'id' => 'customize-styles-styling-tab', |
| 1318 | 'type' => 'section-title', |
| 1319 | ) |
| 1320 | ); |
| 1321 | |
| 1322 | Settings_Builder::build_option( |
| 1323 | array( |
| 1324 | 'text' => \esc_html__( 'By default, the user 2FA wizards which the users see and use to set up 2FA have our own styling. Disable the below setting so the wizards use the styling of your website\'s theme.', 'wp-2fa' ), |
| 1325 | 'class' => 'description-settings-card', |
| 1326 | 'id' => 'customize-styles-styling-tab', |
| 1327 | 'type' => 'description', |
| 1328 | ) |
| 1329 | ); |
| 1330 | ?> |
| 1331 | |
| 1332 | <div class="form-group settings-row"> |
| 1333 | <?php |
| 1334 | Settings_Builder::build_option( |
| 1335 | array( |
| 1336 | 'text' => \esc_html__( 'Enable styling', 'wp-2fa' ), |
| 1337 | 'id' => 'enable-wizard-styling-label', |
| 1338 | 'type' => 'settings-label', |
| 1339 | ) |
| 1340 | ); |
| 1341 | ?> |
| 1342 | <div class="settings-control"> |
| 1343 | <?php |
| 1344 | Settings_Builder::build_option( |
| 1345 | array( |
| 1346 | 'id' => 'enable_wizard_styling', |
| 1347 | 'value' => 'enable_wizard_styling', |
| 1348 | 'type' => 'checkbox', |
| 1349 | 'text' => \esc_html__( 'Enable our CSS within user wizards', 'wp-2fa' ), |
| 1350 | 'option_name' => 'wp_2fa_white_label[enable_wizard_styling]', |
| 1351 | 'not_bool' => true, |
| 1352 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'enable_wizard_styling', false ), |
| 1353 | ) |
| 1354 | ); |
| 1355 | ?> |
| 1356 | </div> |
| 1357 | </div> |
| 1358 | </div><!-- /.settings-card --> |
| 1359 | |
| 1360 | <div class="settings-card"> |
| 1361 | <?php |
| 1362 | |
| 1363 | Settings_Builder::build_option( |
| 1364 | array( |
| 1365 | 'title' => esc_html__( 'Display logo in the user 2FA wizards', 'wp-2fa' ), |
| 1366 | 'id' => 'customize-styles-logo-tab', |
| 1367 | 'type' => 'section-title', |
| 1368 | ) |
| 1369 | ); |
| 1370 | |
| 1371 | Settings_Builder::build_option( |
| 1372 | array( |
| 1373 | 'text' => \wp_sprintf( |
| 1374 | // translators: Link to logo settings page. |
| 1375 | \esc_html__( 'Enable this setting to display your logo in the user 2FA wizards. To provide a logo, please use the Logo settings on the %s.', 'wp-2fa' ), |
| 1376 | \wp_sprintf( '<a href="%s" onclick="location.href=this.href;location.reload();return false;">%s</a>', \esc_url( \network_admin_url( 'admin.php?page=wp-2fa-white-labeling#section=customize-code-page&tab=styles' ) ), \esc_html__( '2FA Code page design settings', 'wp-2fa' ) ) |
| 1377 | ), |
| 1378 | 'class' => 'description-settings-card', |
| 1379 | 'id' => 'customize-styles-logo-tab', |
| 1380 | 'type' => 'description', |
| 1381 | ) |
| 1382 | ); |
| 1383 | ?> |
| 1384 | |
| 1385 | <?php |
| 1386 | $wizard_logo_is_set = '' !== trim( (string) WP2FA::get_wp2fa_white_label_setting( 'logo-code-page', false ) ); |
| 1387 | ?> |
| 1388 | |
| 1389 | <div class="form-group settings-row"> |
| 1390 | <?php |
| 1391 | Settings_Builder::build_option( |
| 1392 | array( |
| 1393 | 'text' => \esc_html__( 'Display logo', 'wp-2fa' ), |
| 1394 | 'id' => 'enable-wizard-logo-label', |
| 1395 | 'type' => 'settings-label', |
| 1396 | ) |
| 1397 | ); |
| 1398 | ?> |
| 1399 | <div class="settings-control"> |
| 1400 | <?php |
| 1401 | Settings_Builder::build_option( |
| 1402 | array( |
| 1403 | 'id' => 'enable_wizard_logo', |
| 1404 | 'value' => 'enable_wizard_logo', |
| 1405 | 'hint' => $wizard_logo_is_set |
| 1406 | ? \esc_html__( 'Shows at max height of 50px.', 'wp-2fa' ) |
| 1407 | : \esc_html__( 'To enable this option, first set a logo on the 2FA Code page design settings.', 'wp-2fa' ), |
| 1408 | 'type' => 'checkbox', |
| 1409 | 'text' => \esc_html__( 'Display logo on user 2FA modals', 'wp-2fa' ), |
| 1410 | 'option_name' => 'wp_2fa_white_label[enable_wizard_logo]', |
| 1411 | 'not_bool' => true, |
| 1412 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'enable_wizard_logo', false ), |
| 1413 | 'disabled' => ! $wizard_logo_is_set, |
| 1414 | ) |
| 1415 | ); |
| 1416 | ?> |
| 1417 | </div> |
| 1418 | </div> |
| 1419 | </div><!-- /.settings-card --> |
| 1420 | |
| 1421 | <div class="settings-card"> |
| 1422 | <?php |
| 1423 | |
| 1424 | Settings_Builder::build_option( |
| 1425 | array( |
| 1426 | 'title' => esc_html__( 'Help icon', 'wp-2fa' ), |
| 1427 | 'id' => 'customize-styles-help-icon-tab', |
| 1428 | 'type' => 'section-title', |
| 1429 | ) |
| 1430 | ); |
| 1431 | ?> |
| 1432 | |
| 1433 | <div class="form-group settings-row"> |
| 1434 | <?php |
| 1435 | Settings_Builder::build_option( |
| 1436 | array( |
| 1437 | 'text' => \esc_html__( 'Display a help icon in the 2FA setup wizard', 'wp-2fa' ), |
| 1438 | 'id' => 'show-help-text-label', |
| 1439 | 'type' => 'settings-label', |
| 1440 | ) |
| 1441 | ); |
| 1442 | ?> |
| 1443 | <div class="settings-control"> |
| 1444 | <?php |
| 1445 | Settings_Builder::build_option( |
| 1446 | array( |
| 1447 | 'id' => 'show_help_text', |
| 1448 | 'value' => 'show_help_text', |
| 1449 | 'type' => 'checkbox', |
| 1450 | 'text' => \esc_html__( 'Display a help icon in the setup wizard that provides additional guidance when clicked for users configuring 2FA with different methods.', 'wp-2fa' ), |
| 1451 | 'option_name' => 'wp_2fa_white_label[show_help_text]', |
| 1452 | 'not_bool' => true, |
| 1453 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'show_help_text', true ), |
| 1454 | ) |
| 1455 | ); |
| 1456 | ?> |
| 1457 | </div> |
| 1458 | </div> |
| 1459 | </div><!-- /.settings-card --> |
| 1460 | |
| 1461 | <div class="settings-card"> |
| 1462 | <?php |
| 1463 | |
| 1464 | Settings_Builder::build_option( |
| 1465 | array( |
| 1466 | 'title' => esc_html__( 'Custom CSS & Styling', 'wp-2fa' ), |
| 1467 | 'id' => 'customize-styles-css-tab', |
| 1468 | 'type' => 'section-title', |
| 1469 | ) |
| 1470 | ); |
| 1471 | |
| 1472 | Settings_Builder::build_option( |
| 1473 | array( |
| 1474 | 'text' => \esc_html__( 'In this section you can add your own styling to the user 2FA setup wizard via CSS. For your reference we have included a number of easy to use selectors. They are listed below the Custom CSS placeholder.', 'wp-2fa' ), |
| 1475 | 'class' => 'description-settings-card', |
| 1476 | 'id' => 'customize-styles-css-tab', |
| 1477 | 'type' => 'description', |
| 1478 | ) |
| 1479 | ); |
| 1480 | ?> |
| 1481 | |
| 1482 | <div class="form-group settings-row"> |
| 1483 | <div class="settings-label-group"> |
| 1484 | <?php |
| 1485 | Settings_Builder::build_option( |
| 1486 | array( |
| 1487 | 'text' => \esc_html__( 'Custom CSS', 'wp-2fa' ), |
| 1488 | 'id' => 'custom-css-label', |
| 1489 | 'type' => 'settings-label', |
| 1490 | ) |
| 1491 | ); |
| 1492 | |
| 1493 | Settings_Builder::build_option( |
| 1494 | array( |
| 1495 | 'text' => \esc_html__( 'Note: Only plain-text CSS is allowed. Avoid using "!important" unless absolutely necessary, as it makes styles harder to override later.', 'wp-2fa' ), |
| 1496 | 'class' => 'description-settings-card', |
| 1497 | 'id' => 'custom-css-desc', |
| 1498 | 'type' => 'description', |
| 1499 | ) |
| 1500 | ); |
| 1501 | ?> |
| 1502 | </div> |
| 1503 | <div class="settings-control"> |
| 1504 | <?php |
| 1505 | Settings_Builder::build_option( |
| 1506 | array( |
| 1507 | 'id' => 'custom_css', |
| 1508 | 'type' => 'textarea', |
| 1509 | 'option_name' => 'wp_2fa_white_label[custom_css]', |
| 1510 | 'default' => WP2FA::get_wp2fa_white_label_setting( 'custom_css', true ), |
| 1511 | ) |
| 1512 | ); |
| 1513 | |
| 1514 | Settings_Builder::build_option( |
| 1515 | array( |
| 1516 | 'text' => \wp_sprintf( |
| 1517 | '<strong>.wp-2fa-button-primary</strong> — %s<br><strong>.wp-2fa-button-secondary</strong> — %s<br><strong>.wp2fa-modal h3</strong> — %s<br><strong>.wp2fa-modal p</strong> — %s', |
| 1518 | \esc_html__( 'Primary button selector', 'wp-2fa' ), |
| 1519 | \esc_html__( 'Secondary button selector', 'wp-2fa' ), |
| 1520 | \esc_html__( 'Common heading text (unless altered with custom markup)', 'wp-2fa' ), |
| 1521 | \esc_html__( 'Common content text (unless altered with custom markup)', 'wp-2fa' ) |
| 1522 | ), |
| 1523 | 'class' => 'description-settings-card', |
| 1524 | 'type' => 'description', |
| 1525 | ) |
| 1526 | ); |
| 1527 | ?> |
| 1528 | </div> |
| 1529 | </div> |
| 1530 | </div><!-- /.settings-card --> |
| 1531 | </div><!-- /.tab-panel-customize-styles --> |
| 1532 | </div><!-- /.settings-page --> |
| 1533 |