|
9 | 9 |
|
10 | 10 | use HCaptcha\Admin\Notifications; |
11 | 11 | use HCaptcha\Helpers\HCaptcha; |
| 12 | +use HCaptcha\Main; |
12 | 13 | use KAGG\Settings\Abstracts\SettingsBase; |
13 | 14 |
|
14 | 15 | /** |
@@ -48,6 +49,11 @@ class General extends PluginSettingsBase { |
48 | 49 | */ |
49 | 50 | const SECTION_CUSTOM = 'custom'; |
50 | 51 |
|
| 52 | + /** |
| 53 | + * Enterprise section id. |
| 54 | + */ |
| 55 | + const SECTION_ENTERPRISE = 'enterprise'; |
| 56 | + |
51 | 57 | /** |
52 | 58 | * Other section id. |
53 | 59 | */ |
@@ -369,6 +375,49 @@ public function init_form_fields() { |
369 | 375 | ) |
370 | 376 | ), |
371 | 377 | ], |
| 378 | + 'api_host' => [ |
| 379 | + 'label' => __( 'API Host', 'hcaptcha-for-forms-and-more' ), |
| 380 | + 'type' => 'text', |
| 381 | + 'section' => self::SECTION_ENTERPRISE, |
| 382 | + 'default' => Main::API_HOST, |
| 383 | + 'helper' => __( 'See Enterprise docs.' ), |
| 384 | + ], |
| 385 | + 'asset_host' => [ |
| 386 | + 'label' => __( 'Asset Host', 'hcaptcha-for-forms-and-more' ), |
| 387 | + 'type' => 'text', |
| 388 | + 'section' => self::SECTION_ENTERPRISE, |
| 389 | + 'helper' => __( 'See Enterprise docs.', 'hcaptcha-for-forms-and-more' ), |
| 390 | + ], |
| 391 | + 'endpoint' => [ |
| 392 | + 'label' => __( 'Endpoint', 'hcaptcha-for-forms-and-more' ), |
| 393 | + 'type' => 'text', |
| 394 | + 'section' => self::SECTION_ENTERPRISE, |
| 395 | + 'helper' => __( 'See Enterprise docs.', 'hcaptcha-for-forms-and-more' ), |
| 396 | + ], |
| 397 | + 'host' => [ |
| 398 | + 'label' => __( 'Host', 'hcaptcha-for-forms-and-more' ), |
| 399 | + 'type' => 'text', |
| 400 | + 'section' => self::SECTION_ENTERPRISE, |
| 401 | + 'helper' => __( 'See Enterprise docs.', 'hcaptcha-for-forms-and-more' ), |
| 402 | + ], |
| 403 | + 'image_host' => [ |
| 404 | + 'label' => __( 'Image Host', 'hcaptcha-for-forms-and-more' ), |
| 405 | + 'type' => 'text', |
| 406 | + 'section' => self::SECTION_ENTERPRISE, |
| 407 | + 'helper' => __( 'See Enterprise docs.', 'hcaptcha-for-forms-and-more' ), |
| 408 | + ], |
| 409 | + 'report_api' => [ |
| 410 | + 'label' => __( 'Report API', 'hcaptcha-for-forms-and-more' ), |
| 411 | + 'type' => 'text', |
| 412 | + 'section' => self::SECTION_ENTERPRISE, |
| 413 | + 'helper' => __( 'See Enterprise docs.', 'hcaptcha-for-forms-and-more' ), |
| 414 | + ], |
| 415 | + 'sentry' => [ |
| 416 | + 'label' => __( 'Sentry', 'hcaptcha-for-forms-and-more' ), |
| 417 | + 'type' => 'text', |
| 418 | + 'section' => self::SECTION_ENTERPRISE, |
| 419 | + 'helper' => __( 'See Enterprise docs.', 'hcaptcha-for-forms-and-more' ), |
| 420 | + ], |
372 | 421 | 'off_when_logged_in' => [ |
373 | 422 | 'label' => __( 'Other Settings', 'hcaptcha-for-forms-and-more' ), |
374 | 423 | 'type' => 'checkbox', |
@@ -474,6 +523,9 @@ public function section_callback( array $arguments ) { |
474 | 523 | case self::SECTION_CUSTOM: |
475 | 524 | $this->print_section_header( $arguments['id'], __( 'Custom', 'hcaptcha-for-forms-and-more' ) ); |
476 | 525 | break; |
| 526 | + case self::SECTION_ENTERPRISE: |
| 527 | + $this->print_section_header( $arguments['id'], __( 'Enterprise', 'hcaptcha-for-forms-and-more' ) ); |
| 528 | + break; |
477 | 529 | case self::SECTION_OTHER: |
478 | 530 | $this->print_section_header( $arguments['id'], __( 'Other', 'hcaptcha-for-forms-and-more' ) ); |
479 | 531 | break; |
|
0 commit comments